Commit 8744c10a authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdi32: Add support for disk-based metafiles to GetMetaFileBitsEx.

parent 4641ed5c
......@@ -1088,17 +1088,27 @@ UINT WINAPI GetMetaFileBitsEx( HMETAFILE hmf, UINT nSize, LPVOID buf )
{
METAHEADER *mh = GDI_GetObjPtr( hmf, OBJ_METAFILE );
UINT mfSize;
BOOL mf_copy = FALSE;
TRACE("(%p,%d,%p)\n", hmf, nSize, buf);
if (!mh) return 0; /* FIXME: error code */
if(mh->mtType == METAFILE_DISK)
FIXME("Disk-based metafile?\n");
{
mh = MF_LoadDiskBasedMetaFile( mh );
if (!mh)
{
GDI_ReleaseObj( hmf );
return 0;
}
mf_copy = TRUE;
}
mfSize = mh->mtSize * 2;
if (buf)
{
if(mfSize > nSize) mfSize = nSize;
memmove(buf, mh, mfSize);
}
if (mf_copy) HeapFree( GetProcessHeap(), 0, mh );
GDI_ReleaseObj( hmf );
TRACE("returning size %d\n", mfSize);
return mfSize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment