From: Tobiasz Laskowski <tlaskowski@codeweavers.com> The documentation says that the upper-left, upper-right, and lower-left corners should be passed in. However, the code was incorrectly passing the lower-right corner instead of the lower-left, resulting in skewed rendering. https://learn.microsoft.com/en-us/windows/win32/api/gdiplusgraphics/nf-gdipl... --- dlls/gdiplus/metafile.c | 8 ++++---- dlls/gdiplus/tests/metafile.c | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index b9323559582..ad3533acb4e 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -3240,8 +3240,8 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile, points[0].Y = draw->RectData.rect.Y; points[1].X = points[0].X + draw->RectData.rect.Width; points[1].Y = points[0].Y; - points[2].X = points[1].X; - points[2].Y = points[1].Y + draw->RectData.rect.Height; + points[2].X = points[0].X; + points[2].Y = points[0].Y + draw->RectData.rect.Height; } else { @@ -3249,8 +3249,8 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile, points[0].Y = draw->RectData.rectF.Y; points[1].X = points[0].X + draw->RectData.rectF.Width; points[1].Y = points[0].Y; - points[2].X = points[1].X; - points[2].Y = points[1].Y + draw->RectData.rectF.Height; + points[2].X = points[0].X; + points[2].Y = points[0].Y + draw->RectData.rectF.Height; } return GdipDrawImagePointsRect(real_metafile->playback_graphics, real_metafile->objtable[image].u.image, diff --git a/dlls/gdiplus/tests/metafile.c b/dlls/gdiplus/tests/metafile.c index 6504d773ea8..4a47551c777 100644 --- a/dlls/gdiplus/tests/metafile.c +++ b/dlls/gdiplus/tests/metafile.c @@ -2825,7 +2825,6 @@ static void test_drawimage_record(void) { stat = GdipBitmapGetPixel(bitmap, 0, 99, &color); expect(Ok, stat); - todo_wine expect(0xffff0000, color); GdipDisposeImage((GpImage*)bitmap); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11727