-wxMetaFileDC::wxMetaFileDC(const wxString& file, int xext, int yext, int xorg, int yorg)
-{
- m_minX = 10000;
- m_minY = 10000;
- m_maxX = -10000;
- m_maxY = -10000;
-
- wxASSERT_MSG( file.IsEmpty() , wxT("no file based metafile support yet")) ;
-
- m_metaFile = new wxMetaFile(wxEmptyString) ;
- Rect r={yorg,xorg,yorg+yext,xorg+xext} ;
-
- m_metaFile->SetHMETAFILE( OpenPicture( &r ) ) ;
- ::GetPort( (GrafPtr*) &m_macPort ) ;
- m_ok = TRUE ;
-
- SetMapMode(wxMM_TEXT);
+wxMetaFileDC::wxMetaFileDC(const wxString& filename ,
+ int width , int height ,
+ const wxString& WXUNUSED(description) )
+{
+ wxASSERT_MSG( width == 0 || height == 0 , _T("no arbitration of metafilesize supported") ) ;
+ wxASSERT_MSG( filename.empty() , _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( (WXHMETAFILE) OpenPicture( &r ) ) ;
+ ::GetPort( (GrafPtr*) &m_macPort ) ;
+ m_ok = true ;
+#endif
+ SetMapMode(wxMM_TEXT);