Nikolay Sivov : gdiplus/metafile: Support hatch brushes in playback.

Alexandre Julliard julliard at winehq.org
Thu Nov 2 17:28:49 CDT 2017


Module: wine
Branch: master
Commit: 6d0ca495b8b0555c5f62911e43fee04396cd7fe1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6d0ca495b8b0555c5f62911e43fee04396cd7fe1

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Nov  2 14:10:39 2017 +0300

gdiplus/metafile: Support hatch brushes in playback.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdiplus/metafile.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c
index bf07fed..c9ddcc6 100644
--- a/dlls/gdiplus/metafile.c
+++ b/dlls/gdiplus/metafile.c
@@ -230,12 +230,20 @@ typedef struct EmfPlusSolidBrushData
     EmfPlusARGB SolidColor;
 } EmfPlusSolidBrushData;
 
+typedef struct EmfPlusHatchBrushData
+{
+    DWORD HatchStyle;
+    EmfPlusARGB ForeColor;
+    EmfPlusARGB BackColor;
+} EmfPlusHatchBrushData;
+
 typedef struct EmfPlusBrush
 {
     DWORD Version;
     DWORD Type;
     union {
         EmfPlusSolidBrushData solid;
+        EmfPlusHatchBrushData hatch;
     } BrushData;
 } EmfPlusBrush;
 
@@ -1833,6 +1841,13 @@ static GpStatus metafile_deserialize_brush(const BYTE *record_data, UINT data_si
 
         status = GdipCreateSolidFill(data->BrushData.solid.SolidColor, (GpSolidFill **)brush);
         break;
+    case BrushTypeHatchFill:
+        if (data_size != header_size + sizeof(EmfPlusHatchBrushData))
+            return InvalidParameter;
+
+        status = GdipCreateHatchBrush(data->BrushData.hatch.HatchStyle, data->BrushData.hatch.ForeColor,
+            data->BrushData.hatch.BackColor, (GpHatch **)brush);
+        break;
     default:
         FIXME("brush type %u is not supported.\n", data->Type);
         return NotImplemented;




More information about the wine-cvs mailing list