From d0f2361170d140ad2510bb26ad187d30fd1c1afa Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 23 Oct 2017 09:47:06 +0300 Subject: [PATCH] gdiplus/metafile: Implement EmfPlusRecordTypeSetClipPath playback. Signed-off-by: Nikolay Sivov Signed-off-by: Vincent Povirk Signed-off-by: Alexandre Julliard --- dlls/gdiplus/metafile.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index 4990a5fec26..91e18a55c8c 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, ®ion); + if (stat == Ok) + { + stat = metafile_set_clip_region(real_metafile, region, mode); + GdipDeleteRegion(region); + } + + return stat; + } case EmfPlusRecordTypeSetPageTransform: { EmfPlusSetPageTransform *record = (EmfPlusSetPageTransform*)header;