// Implementation
WXHMETAFILE GetHMETAFILE() const ;
void SetHMETAFILE(WXHMETAFILE mf) ;
-#if wxOSX_USE_COCOA_OR_CARBON && !defined( __LP64__ )
- // Since the native metafile format is PDF for Quartz
- // we need a call that allows setting PICT content for
- // backwards compatibility
- void SetPICT(void* pictHandle) ;
-#endif
-
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
m_refData = new wxMetafileRefData((CFDataRef)mf);
}
-#if wxOSX_USE_COCOA_OR_CARBON && !defined( __LP64__ )
-void wxMetafile::SetPICT(void* pictHandle)
-{
- UnRef();
-
- Handle picHandle = (Handle) pictHandle;
- HLock(picHandle);
- CFDataRef data = CFDataCreateWithBytesNoCopy( kCFAllocatorDefault, (const UInt8*) *picHandle, GetHandleSize(picHandle), kCFAllocatorNull);
- wxCFRef<CGDataProviderRef> provider(wxMacCGDataProviderCreateWithCFData(data));
- QDPictRef pictRef = QDPictCreateWithProvider(provider);
- CGRect rect = QDPictGetBounds(pictRef);
- 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 );
- ((wxMetafileRefData*) m_refData)->Close();
-}
-#endif
-
bool wxMetaFile::Play(wxDC *dc)
{
if (!m_refData)