#endif
};
-
-extern bool wxClipboardIsOpen;
-
-
wxMetafileRefData::wxMetafileRefData()
{
m_metafile = NULL;
{
if (m_metafile)
{
+#ifndef __LP64__
KillPicture( (PicHandle)m_metafile );
m_metafile = NULL;
#if wxMAC_USE_CORE_GRAPHICS
QDPictRelease( m_qdPictRef );
m_qdPictRef = NULL;
+#endif
#endif
}
}
{
}
-bool wxMetaFile::Ok() const
+bool wxMetaFile::IsOk() const
{
return (M_METAFILEDATA && (M_METAFILEDATA->m_metafile != NULL));
}
membuf, data, sz, wxMacMemoryBufferReleaseProc );
M_METAFILEDATA->m_qdPictRef = NULL;
+#ifndef __LP64__
if (provider != NULL)
{
M_METAFILEDATA->m_qdPictRef = QDPictCreateWithProvider( provider );
CGDataProviderRelease( provider );
}
#endif
+#endif
}
bool wxMetaFile::Play(wxDC *dc)
{
#if wxMAC_USE_CORE_GRAPHICS
+#ifndef __LP64__
QDPictRef cgPictRef = M_METAFILEDATA->m_qdPictRef;
- CGContextRef cg = ((wxMacCGContext*)(dc->GetGraphicContext()))->GetNativeContext();
+ CGContextRef cg = (CGContextRef) dc->GetGraphicsContext()->GetNativeContext();
CGRect bounds = QDPictGetBounds( cgPictRef );
CGContextSaveGState( cg );
CGContextScaleCTM( cg, 1, -1 );
QDPictDrawToCGContext( cg, bounds, cgPictRef );
CGContextRestoreGState( cg );
+#endif
#else
PicHandle pict = (PicHandle)GetHMETAFILE();
wxMacPortSetter helper( dc );
if (Ok())
{
- PicHandle pict = (PicHandle)GetHMETAFILE();
+#ifndef __LP64__
+ PicHandle pict = (PicHandle)GetHMETAFILE();
Rect r;
wxMacGetPictureBounds( pict, &r );
dataSize.x = r.right - r.left;
dataSize.y = r.bottom - r.top;
+#endif
}
return dataSize;
wxMetaFile *wxMetaFileDC::Close()
{
+#ifndef __LP64__
ClosePicture();
-
+#endif
return m_metaFile;
}