Dmitry Timoshkov : gdiplus: Implement GdipCreateMetafileFromStream.
Module: wine Branch: master Commit: 3769778917b2cea0590ffb50e1174e354235174c URL: http://source.winehq.org/git/wine.git/?a=commit;h=3769778917b2cea0590ffb50e1... Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Sep 9 13:42:43 2016 -0500 gdiplus: Implement GdipCreateMetafileFromStream. Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/metafile.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index 71d89ae..b3b4682 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -1917,8 +1917,21 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromFile(GDIPCONST WCHAR *file, GpStatus WINGDIPAPI GdipCreateMetafileFromStream(IStream *stream, GpMetafile **metafile) { - FIXME("(%p, %p): stub\n", stream, metafile); - return NotImplemented; + GpStatus stat; + + TRACE("%p %p\n", stream, metafile); + + stat = GdipLoadImageFromStream(stream, (GpImage **)metafile); + if (stat != Ok) return stat; + + if ((*metafile)->image.type != ImageTypeMetafile) + { + GdipDisposeImage(&(*metafile)->image); + *metafile = NULL; + return GenericError; + } + + return Ok; } GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpMetafile *metafile,
participants (1)
-
Alexandre Julliard