X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5088ab3fdd8c130acf28aaa410ffd8ed9adb25a0..2e57368359ab190b5bbad1849d88f298e30723c9:/src/mac/carbon/dataobj.cpp diff --git a/src/mac/carbon/dataobj.cpp b/src/mac/carbon/dataobj.cpp index cc1c352206..fb73241ed9 100644 --- a/src/mac/carbon/dataobj.cpp +++ b/src/mac/carbon/dataobj.cpp @@ -311,8 +311,10 @@ void wxBitmapDataObject::Clear() { if (m_pictHandle != NULL) { +#ifndef __LP64__ if (m_pictCreated) KillPicture( (PicHandle)m_pictHandle ); +#endif m_pictHandle = NULL; } @@ -356,16 +358,21 @@ bool wxBitmapDataObject::SetData( size_t nSize, const void *pBuf ) // ownership is transferred to the bitmap m_pictCreated = false; +#ifndef __LP64__ Rect frame; wxMacGetPictureBounds( picHandle, &frame ); - +#if wxUSE_METAFILE wxMetafile mf; mf.SetHMETAFILE( (WXHMETAFILE)m_pictHandle ); +#endif wxMemoryDC mdc; m_bitmap.Create( frame.right - frame.left, frame.bottom - frame.top ); mdc.SelectObject( m_bitmap ); +#if wxUSE_METAFILE mf.Play( &mdc ); +#endif mdc.SelectObject( wxNullBitmap ); +#endif return m_bitmap.Ok(); }