mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
47 lines
1.3 KiB
Diff
47 lines
1.3 KiB
Diff
|
From 601c19472c2f57dbefa53deaf0c7bdb7625d7e7c Mon Sep 17 00:00:00 2001
|
||
|
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||
|
Date: Tue, 10 May 2016 12:59:48 +0800
|
||
|
Subject: gdiplus: Implement GdipGetMetafileHeaderFromStream.
|
||
|
|
||
|
---
|
||
|
dlls/gdiplus/metafile.c | 18 ++++++++++--------
|
||
|
1 file changed, 10 insertions(+), 8 deletions(-)
|
||
|
|
||
|
diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c
|
||
|
index 8efe122..2164d42 100644
|
||
|
--- a/dlls/gdiplus/metafile.c
|
||
|
+++ b/dlls/gdiplus/metafile.c
|
||
|
@@ -1102,19 +1102,21 @@ GpStatus WINGDIPAPI GdipGetMetafileHeaderFromFile(GDIPCONST WCHAR *filename,
|
||
|
GpStatus WINGDIPAPI GdipGetMetafileHeaderFromStream(IStream *stream,
|
||
|
MetafileHeader *header)
|
||
|
{
|
||
|
- static int calls;
|
||
|
+ GpStatus status;
|
||
|
+ GpMetafile *metafile;
|
||
|
|
||
|
TRACE("(%p,%p)\n", stream, header);
|
||
|
|
||
|
- if(!stream || !header)
|
||
|
+ if (!stream || !header)
|
||
|
return InvalidParameter;
|
||
|
|
||
|
- if(!(calls++))
|
||
|
- FIXME("not implemented\n");
|
||
|
-
|
||
|
- memset(header, 0, sizeof(MetafileHeader));
|
||
|
-
|
||
|
- return Ok;
|
||
|
+ status = GdipCreateMetafileFromStream(stream, &metafile);
|
||
|
+ if (status == Ok)
|
||
|
+ {
|
||
|
+ status = GdipGetMetafileHeaderFromMetafile(metafile, header);
|
||
|
+ GdipDisposeImage(&metafile->image);
|
||
|
+ }
|
||
|
+ return status;
|
||
|
}
|
||
|
|
||
|
GpStatus WINGDIPAPI GdipCreateMetafileFromEmf(HENHMETAFILE hemf, BOOL delete,
|
||
|
--
|
||
|
2.8.0
|
||
|
|