Signed-off-by: Jeff Smith whydoubt@gmail.com --- dlls/gdiplus/graphicspath.c | 9 +++++---- dlls/gdiplus/tests/graphicspath.c | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 9e819242b8..0308c943f3 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -2337,6 +2337,7 @@ GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix, if (status == Ok) { REAL anchor_pen_width = max(pen->width, 2.0); + REAL pen_width = (pen->unit == UnitWorld) ? max(pen->width, 1.0) : pen->width; BYTE *types = flat_path->pathdata.Types;
last_point = points; @@ -2364,17 +2365,17 @@ GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix, if ((types[i]&PathPointTypeCloseSubpath) == PathPointTypeCloseSubpath) { if (pen->dash != DashStyleSolid) - widen_dashed_figure(flat_path, subpath_start, i, 1, pen, pen->width, &last_point); + widen_dashed_figure(flat_path, subpath_start, i, 1, pen, pen_width, &last_point); else - widen_closed_figure(flat_path, subpath_start, i, pen, pen->width, &last_point); + widen_closed_figure(flat_path, subpath_start, i, pen, pen_width, &last_point); } else if (i == flat_path->pathdata.Count-1 || (types[i+1]&PathPointTypePathTypeMask) == PathPointTypeStart) { if (pen->dash != DashStyleSolid) - widen_dashed_figure(flat_path, subpath_start, i, 0, pen, pen->width, &last_point); + widen_dashed_figure(flat_path, subpath_start, i, 0, pen, pen_width, &last_point); else - widen_open_figure(flat_path->pathdata.Points, subpath_start, i, pen, pen->width, pen->startcap, pen->customstart, pen->endcap, pen->customend, &last_point); + widen_open_figure(flat_path->pathdata.Points, subpath_start, i, pen, pen_width, pen->startcap, pen->customstart, pen->endcap, pen->customend, &last_point); } }
diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c index 7fd9b02b28..2362872fa0 100644 --- a/dlls/gdiplus/tests/graphicspath.c +++ b/dlls/gdiplus/tests/graphicspath.c @@ -1078,10 +1078,10 @@ static path_test_t widenline_dash_path[] = { };
static path_test_t widenline_unit_path[] = { - {5.0, 9.5, PathPointTypeStart, 0, 1}, /*0*/ - {50.0, 9.5, PathPointTypeLine, 0, 1}, /*1*/ - {50.0, 10.5, PathPointTypeLine, 0, 1}, /*2*/ - {5.0, 10.5, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 1} /*3*/ + {5.0, 9.5, PathPointTypeStart, 0, 0}, /*0*/ + {50.0, 9.5, PathPointTypeLine, 0, 0}, /*1*/ + {50.0, 10.5, PathPointTypeLine, 0, 0}, /*2*/ + {5.0, 10.5, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0} /*3*/ };
static void test_widen(void)