gdiplus: Add support for reading nested metafiles.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b3c5b7da94
commit
e2f37558a7
|
@ -1817,6 +1817,39 @@ static GpStatus metafile_deserialize_image(const BYTE *record_data, UINT data_si
|
|||
}
|
||||
break;
|
||||
}
|
||||
case ImageDataTypeMetafile:
|
||||
{
|
||||
EmfPlusMetafile *metafiledata = &data->ImageData.metafile;
|
||||
|
||||
if (data_size <= FIELD_OFFSET(EmfPlusMetafile, MetafileData))
|
||||
return InvalidParameter;
|
||||
data_size -= FIELD_OFFSET(EmfPlusMetafile, MetafileData);
|
||||
|
||||
switch (metafiledata->Type) {
|
||||
case MetafileTypeEmf:
|
||||
case MetafileTypeEmfPlusOnly:
|
||||
case MetafileTypeEmfPlusDual:
|
||||
{
|
||||
HENHMETAFILE hemf;
|
||||
|
||||
hemf = SetEnhMetaFileBits(data_size, metafiledata->MetafileData);
|
||||
|
||||
if (!hemf)
|
||||
return GenericError;
|
||||
|
||||
status = GdipCreateMetafileFromEmf(hemf, TRUE, (GpMetafile**)image);
|
||||
|
||||
if (status != Ok)
|
||||
DeleteEnhMetaFile(hemf);
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
FIXME("metafile type %d not supported.\n", metafiledata->Type);
|
||||
return NotImplemented;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
FIXME("image type %d not supported.\n", data->Type);
|
||||
return NotImplemented;
|
||||
|
|
Loading…
Reference in New Issue