Module: wine Branch: master Commit: f9e77ad77c14cce80c5e57fb30c3a121ee369d21 URL: https://gitlab.winehq.org/wine/wine/-/commit/f9e77ad77c14cce80c5e57fb30c3a12...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Sun May 14 15:23:04 2023 +0800
gdiplus: Support playing back pen custom end line cap.
Fix Cafe Stella (SteamID: 1829980) Flowchart crashes once there are 2 things on it.
---
dlls/gdiplus/metafile.c | 7 ++++++- dlls/gdiplus/tests/metafile.c | 1 - 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index 9d209e81983..4880211ad87 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -2671,7 +2671,12 @@ static GpStatus METAFILE_PlaybackObject(GpMetafile *metafile, UINT flags, UINT d if (pendata->PenDataFlags & PenDataCustomEndCap) { EmfPlusCustomEndCapData *endcap = (EmfPlusCustomEndCapData *)((BYTE *)pendata + offset); - FIXME("PenDataCustomEndCap is not supported.\n"); + if ((status = metafile_deserialize_custom_line_cap((BYTE *)endcap, data_size, &custom_line_cap)) != Ok) + goto penfailed; + status = GdipSetPenCustomEndCap(pen, custom_line_cap); + GdipDeleteCustomLineCap(custom_line_cap); + if (status != Ok) + goto penfailed; offset += FIELD_OFFSET(EmfPlusCustomEndCapData, data) + endcap->CustomEndCapSize; }
diff --git a/dlls/gdiplus/tests/metafile.c b/dlls/gdiplus/tests/metafile.c index 4e4277d4d1f..f6a9f5e54a8 100644 --- a/dlls/gdiplus/tests/metafile.c +++ b/dlls/gdiplus/tests/metafile.c @@ -3987,7 +3987,6 @@ static void test_pen(void)
stat = GdipBitmapGetPixel(bitmap, 40, 90, &color); expect(Ok, stat); - todo_wine expect(0xffff0000, color);
stat = GdipDisposeImage((GpImage *)clone_metafile);