X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33ac7e6f01acbac1cff0ad400d8ea7f0bfd0a62f..05159a2750ed2cc5945a85bc5fc6849ad1a30e75:/src/msw/enhmeta.cpp?ds=sidebyside diff --git a/src/msw/enhmeta.cpp b/src/msw/enhmeta.cpp index ac757f7bd5..b931e44bdf 100644 --- a/src/msw/enhmeta.cpp +++ b/src/msw/enhmeta.cpp @@ -193,8 +193,15 @@ wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename, rect.bottom = height; // CreateEnhMetaFile() wants them in HIMETRIC +#ifdef __WXWINE__ + LONG r, b; + PixelToHIMETRIC(&r, &b); + rect.right = r; + rect.bottom = b; +#else PixelToHIMETRIC(&rect.right, &rect.bottom); - +#endif + pRect = ▭ } else @@ -294,6 +301,10 @@ bool wxEnhMetaFileDataObject::GetDataHere(const wxDataFormat& format, void *buf) } else { +#ifdef __WXWINE__ + wxFAIL_MSG( _T("unsupported format") ); + return FALSE; +#else wxASSERT_MSG( format == wxDF_METAFILE, _T("unsupported format") ); // convert to WMF @@ -335,6 +346,7 @@ bool wxEnhMetaFileDataObject::GetDataHere(const wxDataFormat& format, void *buf) mfpict->yExt = sizeMF.y; PixelToHIMETRIC(&mfpict->xExt, &mfpict->yExt); +#endif } return TRUE;