From 109c9e762ab80fcddb5dc489907fe585d81dec89 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 10 May 2016 12:56:24 +0800 Subject: gdiplus: Implement GdipGetMetafileHeaderFromWmf. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/metafile.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 9f7ce5f..893796e 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -303,7 +303,7 @@ 303 stdcall GdipGetMetafileHeaderFromFile(wstr ptr) 304 stdcall GdipGetMetafileHeaderFromMetafile(ptr ptr) 305 stdcall GdipGetMetafileHeaderFromStream(ptr ptr) -306 stub GdipGetMetafileHeaderFromWmf +306 stdcall GdipGetMetafileHeaderFromWmf(ptr ptr ptr) 307 stdcall GdipGetNearestColor(ptr ptr) 308 stdcall GdipGetPageScale(ptr ptr) 309 stdcall GdipGetPageUnit(ptr ptr) diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index 30b2122..8efe122 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -1064,6 +1064,23 @@ GpStatus WINGDIPAPI GdipGetMetafileHeaderFromEmf(HENHMETAFILE hemf, return Ok; } +GpStatus WINGDIPAPI GdipGetMetafileHeaderFromWmf(HMETAFILE hwmf, + GDIPCONST WmfPlaceableFileHeader *placeable, MetafileHeader *header) +{ + GpStatus status; + GpMetafile *metafile; + + TRACE("(%p,%p,%p)\n", hwmf, placeable, header); + + status = GdipCreateMetafileFromWmf(hwmf, FALSE, placeable, &metafile); + if (status == Ok) + { + status = GdipGetMetafileHeaderFromMetafile(metafile, header); + GdipDisposeImage(&metafile->image); + } + return status; +} + GpStatus WINGDIPAPI GdipGetMetafileHeaderFromFile(GDIPCONST WCHAR *filename, MetafileHeader *header) { -- 2.8.0