// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "metafile.h"
#endif
#pragma hdrstop
#endif
-#ifndef WX_PRECOMP
-#include "wx/setup.h"
-#endif
-
#if wxUSE_METAFILE
#ifndef WX_PRECOMP
return FALSE;
{
+#if wxMAC_USE_CORE_GRAPHICS
+#else
wxMacPortSetter helper( dc ) ;
PicHandle pict = (PicHandle) GetHMETAFILE() ;
DrawPicture( pict , &(**pict).picFrame ) ;
+#endif
}
return TRUE;
}
wxASSERT_MSG( filename.IsEmpty() , _T("no file based metafile support yet")) ;
m_metaFile = new wxMetaFile(filename) ;
+#if wxMAC_USE_CORE_GRAPHICS
+#else
Rect r={0,0,height,width} ;
RectRgn( (RgnHandle) m_macBoundaryClipRgn , &r ) ;
CopyRgn( (RgnHandle) m_macBoundaryClipRgn , (RgnHandle) m_macCurrentClipRgn ) ;
- m_metaFile->SetHMETAFILE( OpenPicture( &r ) ) ;
+ m_metaFile->SetHMETAFILE( (WXHMETAFILE) OpenPicture( &r ) ) ;
::GetPort( (GrafPtr*) &m_macPort ) ;
m_ok = TRUE ;
-
+#endif
SetMapMode(wxMM_TEXT);
}
Handle handle = NewHandle( len ) ;
SetHandleSize( handle , len ) ;
memcpy( *handle , buf , len ) ;
- m_metafile.SetHMETAFILE( handle ) ;
+ m_metafile.SetHMETAFILE( (WXHMETAFILE) handle ) ;
return true ;
}
#endif