diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 49dbf6c0c69..58e99a21a3c 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 81670a40658..24619e52cb3 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)