[v2 PATCH 2/5] gdiplus/metafile: Support hatch brushes in playback

Nikolay Sivov <[email protected]>
Newsgroups gmane.comp.emulators.wine.patches
Message-ID <[email protected]>
Signed-off-by: Nikolay Sivov <[email protected]>
---
 dlls/gdiplus/metafile.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c
index bf07fed983..c9ddcc674a 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;
-- 
2.14.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.