Nikolay Sivov : gdiplus/metafile: Implement playback for EmfPlusRecordTypeDrawPath records.

Alexandre Julliard julliard at winehq.org
Fri Oct 20 15:09:37 CDT 2017


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Oct 20 00:45:39 2017 +0300

gdiplus/metafile: Implement playback for EmfPlusRecordTypeDrawPath records.

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

diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c
index 6c18632..f18411b 100644
--- a/dlls/gdiplus/metafile.c
+++ b/dlls/gdiplus/metafile.c
@@ -2547,6 +2547,24 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
             GdipDeleteBrush((GpBrush *)solidfill);
             return stat;
         }
+        case EmfPlusRecordTypeDrawPath:
+        {
+            EmfPlusDrawPath *draw = (EmfPlusDrawPath *)header;
+            BYTE path = flags & 0xff;
+
+            if (dataSize != sizeof(draw->PenId))
+                return InvalidParameter;
+
+            if (path >= EmfPlusObjectTableSize || draw->PenId >= EmfPlusObjectTableSize)
+                return InvalidParameter;
+
+            if (real_metafile->objtable[path].type != ObjectTypePath ||
+                    real_metafile->objtable[draw->PenId].type != ObjectTypePen)
+                return InvalidParameter;
+
+            return GdipDrawPath(real_metafile->playback_graphics, real_metafile->objtable[draw->PenId].u.pen,
+                real_metafile->objtable[path].u.path);
+        }
         default:
             FIXME("Not implemented for record type %x\n", recordType);
             return NotImplemented;




More information about the wine-cvs mailing list