#include "wx/clipbrd.h"
#include "wx/osx/private.h"
#include "wx/graphics.h"
-#include "wx/osx/carbon/metafile.h"
+#include "wx/osx/metafile.h"
#include <stdio.h>
#include <string.h>
{
CGPDFPageRef page = CGPDFDocumentGetPage( m_pdfDoc, 1 );
CGRect rect = CGPDFPageGetBoxRect ( page, kCGPDFMediaBox);
- m_width = wx_static_cast(int, rect.size.width);
- m_height = wx_static_cast(int, rect.size.height);
+ m_width = static_cast<int>(rect.size.width);
+ m_height = static_cast<int>(rect.size.height);
}
}
wxGDIRefData *wxMetaFile::CloneGDIRefData(const wxGDIRefData *data) const
{
- return new wxMetafileRefData(*wx_static_cast(const wxMetafileRefData *, data));
+ return new wxMetafileRefData(*static_cast<const wxMetafileRefData *>(data));
}
WXHMETAFILE wxMetaFile::GetHMETAFILE() const
m_refData = new wxMetafileRefData((CFDataRef)mf);
}
-#ifndef __LP64__
+#if wxOSX_USE_COCOA_OR_CARBON && !defined( __LP64__ )
void wxMetafile::SetPICT(void* pictHandle)
{
UnRef();
wxCFRef<CGDataProviderRef> provider(wxMacCGDataProviderCreateWithCFData(data));
QDPictRef pictRef = QDPictCreateWithProvider(provider);
CGRect rect = QDPictGetBounds(pictRef);
- m_refData = new wxMetafileRefData(wx_static_cast(int, rect.size.width),
- wx_static_cast(int, rect.size.height));
+ m_refData = new wxMetafileRefData(static_cast<int>(rect.size.width),
+ static_cast<int>(rect.size.height));
QDPictDrawToCGContext( ((wxMetafileRefData*) m_refData)->GetContext(), rect, pictRef );
CFRelease( data );
QDPictRelease( pictRef );
wxMetaFile *wxMetafileDCImpl::Close()
{
- delete m_graphicContext;
- m_graphicContext = NULL;
+ wxDELETE(m_graphicContext);
m_ok = false;
M_METAFILEREFDATA(*m_metaFile)->Close();