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)
{
wxSize dataSize = wxDefaultSize;
- if (Ok())
+ if (IsOk())
{
dataSize.x = M_METAFILEDATA->GetWidth();
dataSize.y = M_METAFILEDATA->GetHeight();