Nikolay Sivov : gdiplus/metafile: Implement EmfPlusRecordTypeSetClipPath playback.

Alexandre Julliard julliard at winehq.org
Tue Oct 24 02:40:04 CDT 2017


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Mon Oct 23 09:47:06 2017 +0300

gdiplus/metafile: Implement EmfPlusRecordTypeSetClipPath 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 | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c
index 4990a5f..91e18a5 100644
--- a/dlls/gdiplus/metafile.c
+++ b/dlls/gdiplus/metafile.c
@@ -2362,6 +2362,27 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
 
             return stat;
         }
+        case EmfPlusRecordTypeSetClipPath:
+        {
+            CombineMode mode = (flags >> 8) & 0xf;
+            BYTE pathid = flags & 0xff;
+            GpRegion *region;
+
+            if (dataSize != 0)
+                return InvalidParameter;
+
+            if (pathid >= EmfPlusObjectTableSize || real_metafile->objtable[pathid].type != ObjectTypePath)
+                return InvalidParameter;
+
+            stat = GdipCreateRegionPath(real_metafile->objtable[pathid].u.path, &region);
+            if (stat == Ok)
+            {
+                stat = metafile_set_clip_region(real_metafile, region, mode);
+                GdipDeleteRegion(region);
+            }
+
+            return stat;
+        }
         case EmfPlusRecordTypeSetPageTransform:
         {
             EmfPlusSetPageTransform *record = (EmfPlusSetPageTransform*)header;




More information about the wine-cvs mailing list