Module: wine Branch: master Commit: 6a6aa3134da847e7b91005ae2e6de5999d9e2574 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6a6aa3134da847e7b91005ae2e...
Author: Vincent Povirk vincent@codeweavers.com Date: Tue Feb 16 16:10:22 2016 -0600
gdiplus: Fix GdipWidenPath transform for non-pixel pens.
Signed-off-by: Vincent Povirk vincent@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/gdiplus/graphicspath.c | 5 ++++- dlls/gdiplus/tests/graphicspath.c | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 49dbf6c..58e99a2 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -2074,7 +2074,7 @@ GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix, status = GdipClonePath(path, &flat_path);
if (status == Ok) - status = GdipFlattenPath(flat_path, matrix, flatness); + status = GdipFlattenPath(flat_path, pen->unit == UnitPixel ? matrix : NULL, flatness);
if (status == Ok && !init_path_list(&points, 314.0, 22.0)) status = OutOfMemory; @@ -2147,6 +2147,9 @@ GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix,
GdipDeletePath(flat_path);
+ if (status == Ok && pen->unit != UnitPixel) + status = GdipTransformPath(path, matrix); + return status; }
diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c index 81670a4..24619e5 100644 --- a/dlls/gdiplus/tests/graphicspath.c +++ b/dlls/gdiplus/tests/graphicspath.c @@ -1056,10 +1056,10 @@ static path_test_t widenline_path[] = { };
static path_test_t widenline_wide_path[] = { - {5.0, 0.0, PathPointTypeStart, 0, 1}, /*0*/ - {50.0, 0.0, PathPointTypeLine, 0, 1}, /*1*/ - {50.0, 20.0, PathPointTypeLine, 0, 1}, /*2*/ - {5.0, 20.0, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 1} /*3*/ + {5.0, 0.0, PathPointTypeStart, 0, 0}, /*0*/ + {50.0, 0.0, PathPointTypeLine, 0, 0}, /*1*/ + {50.0, 20.0, PathPointTypeLine, 0, 0}, /*2*/ + {5.0, 20.0, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0} /*3*/ };
static void test_widen(void)