Added patch to implement GdipCreateMetafileFromStream.

This commit is contained in:
Sebastian Lackner 2016-03-20 20:27:12 +01:00
parent 448a3fafa4
commit f49415af69
3 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,40 @@
From df5c81e67b4f660770f98db3dab2d8cb62329975 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sat, 19 Mar 2016 15:47:10 +0800
Subject: gdiplus: Implement GdipCreateMetafileFromStream.
---
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 922c101..ea9badc 100644
--- a/dlls/gdiplus/metafile.c
+++ b/dlls/gdiplus/metafile.c
@@ -1139,8 +1139,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,
--
2.7.1

View File

@ -0,0 +1 @@
Fixes: [40325] Implement GdipCreateMetafileFromStream

View File

@ -150,6 +150,7 @@ patch_enable_all ()
enable_gdi32_MultiMonitor="$1"
enable_gdi32_Path_Metafile="$1"
enable_gdi32_Symbol_Truetype_Font="$1"
enable_gdiplus_GdipCreateMetafileFromStream="$1"
enable_hal_KeQueryPerformanceCounter="$1"
enable_hid_HidP_TranslateUsagesToI8042ScanCodes="$1"
enable_hnetcfg_INetFwAuthorizedApplication="$1"
@ -619,6 +620,9 @@ patch_enable ()
gdi32-Symbol_Truetype_Font)
enable_gdi32_Symbol_Truetype_Font="$2"
;;
gdiplus-GdipCreateMetafileFromStream)
enable_gdiplus_GdipCreateMetafileFromStream="$2"
;;
hal-KeQueryPerformanceCounter)
enable_hal_KeQueryPerformanceCounter="$2"
;;
@ -3727,6 +3731,21 @@ if test "$enable_gdi32_Symbol_Truetype_Font" -eq 1; then
) >> "$patchlist"
fi
# Patchset gdiplus-GdipCreateMetafileFromStream
# |
# | This patchset fixes the following Wine bugs:
# | * [#40325] Implement GdipCreateMetafileFromStream
# |
# | Modified files:
# | * dlls/gdiplus/metafile.c
# |
if test "$enable_gdiplus_GdipCreateMetafileFromStream" -eq 1; then
patch_apply gdiplus-GdipCreateMetafileFromStream/0001-gdiplus-Implement-GdipCreateMetafileFromStream.patch
(
echo '+ { "Dmitry Timoshkov", "gdiplus: Implement GdipCreateMetafileFromStream.", 1 },';
) >> "$patchlist"
fi
# Patchset hal-KeQueryPerformanceCounter
# |
# | This patchset fixes the following Wine bugs: