Nikolay Sivov : gdiplus/metafile: Implement playback for EmfPlusRecordTypeFillPath.

Alexandre Julliard julliard at winehq.org
Mon Oct 16 14:38:31 CDT 2017


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Mon Oct 16 10:12:24 2017 +0300

gdiplus/metafile: Implement playback for EmfPlusRecordTypeFillPath.

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 | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c
index db74c9dc..43d2d8c 100644
--- a/dlls/gdiplus/metafile.c
+++ b/dlls/gdiplus/metafile.c
@@ -2233,6 +2233,39 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
                 points, 3, draw->SrcRect.X, draw->SrcRect.Y, draw->SrcRect.Width, draw->SrcRect.Height, draw->SrcUnit,
                 real_metafile->objtable[draw->ImageAttributesID].u.image_attributes, NULL, NULL);
         }
+        case EmfPlusRecordTypeFillPath:
+        {
+            EmfPlusFillPath *fill = (EmfPlusFillPath *)header;
+            GpSolidFill *solidfill = NULL;
+            BYTE path = flags & 0xff;
+            GpBrush *brush;
+
+            if (path >= EmfPlusObjectTableSize || real_metafile->objtable[path].type != ObjectTypePath)
+                return InvalidParameter;
+
+            if (dataSize != sizeof(fill->data.BrushId))
+                return InvalidParameter;
+
+            if (flags & 0x8000)
+            {
+                stat = GdipCreateSolidFill(*(ARGB *)&fill->data.Color, (GpSolidFill **)&solidfill);
+                if (stat != Ok)
+                    return stat;
+                brush = (GpBrush *)solidfill;
+            }
+            else
+            {
+                if (fill->data.BrushId >= EmfPlusObjectTableSize ||
+                        real_metafile->objtable[fill->data.BrushId].type != ObjectTypeBrush)
+                    return InvalidParameter;
+
+                brush = real_metafile->objtable[fill->data.BrushId].u.brush;
+            }
+
+            stat = GdipFillPath(real_metafile->playback_graphics, brush, real_metafile->objtable[path].u.path);
+            GdipDeleteBrush((GpBrush *)solidfill);
+            return stat;
+        }
         default:
             FIXME("Not implemented for record type %x\n", recordType);
             return NotImplemented;




More information about the wine-cvs mailing list