]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/metafile.cpp
Add static_data flag to SetData and SetAlpha so Python buffer objects
[wxWidgets.git] / src / mac / carbon / metafile.cpp
index adb8b49a4970fce432087c10213dec7c94f64f9a..04c45ae760ccc944be706035c5598dc638357654 100644 (file)
@@ -166,10 +166,9 @@ bool wxMetaFile::Play(wxDC *dc)
         return FALSE;
         
     {
-        PicHandle pict = (PicHandle) GetHMETAFILE() ;
 #if wxMAC_USE_CORE_GRAPHICS
         QDPictRef cgPictRef = M_METAFILEDATA->m_qdPictRef ;
-        CGContextRef cg = dynamic_cast<wxMacCGContext*>(dc->GetGraphicContext())->GetNativeContext() ;
+        CGContextRef cg = ((wxMacCGContext*)(dc->GetGraphicContext()))->GetNativeContext() ;
         CGRect bounds = QDPictGetBounds( cgPictRef ) ;
 
         CGContextSaveGState(cg);    
@@ -178,6 +177,7 @@ bool wxMetaFile::Play(wxDC *dc)
         QDPictDrawToCGContext( cg , bounds , cgPictRef ) ;
         CGContextRestoreGState( cg ) ;
 #else
+        PicHandle pict = (PicHandle) GetHMETAFILE() ;
         wxMacPortSetter helper( dc ) ;
         DrawPicture( pict , &(**pict).picFrame ) ;
 #endif