Commit e2f37558 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Add support for reading nested metafiles.

parent b3c5b7da
......@@ -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;
......
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