diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 0308c943f3e..55545a449ad 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -2104,7 +2104,7 @@ static void widen_open_figure(const GpPointF *points, int start, int end, int i; path_list_node_t *prev_point; - if (end <= start) + if (end <= start || pen_width == 0.0) return; prev_point = *last_point; @@ -2136,7 +2136,7 @@ static void widen_closed_figure(GpPath *path, int start, int end, int i; path_list_node_t *prev_point; - if (end <= start) + if (end <= start || pen_width == 0.0) return; /* left outline */ @@ -2190,7 +2190,7 @@ static void widen_dashed_figure(GpPath *path, int start, int end, int closed, int draw_start_cap=0; static const REAL dash_dot_dot[6] = { 3.0, 1.0, 1.0, 1.0, 1.0, 1.0 }; - if (end <= start) + if (end <= start || pen_width == 0.0) return; switch (pen->dash) diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c index 2362872fa0f..17e6a7cafbe 100644 --- a/dlls/gdiplus/tests/graphicspath.c +++ b/dlls/gdiplus/tests/graphicspath.c @@ -1246,7 +1246,7 @@ static void test_widen(void) status = GdipGetPointCount(path, &count); expect(Ok, status); - todo_wine expect(0, count); + expect(0, count); /* pen width = 0 pixels, UnitWorld - result is a path 1 unit wide */ GdipDeletePen(pen); @@ -1389,7 +1389,7 @@ static path_test_t widenline_caparrowanchor_path[] = { }; static path_test_t widenline_capsquareanchor_thin_path[] = { - {6.414213, 8.585786, PathPointTypeStart, 4, 0}, /*0*/ + {6.414213, 8.585786, PathPointTypeStart, 0, 0}, /*0*/ {6.414213, 11.414213, PathPointTypeLine, 0, 0}, /*1*/ {3.585786, 11.414213, PathPointTypeLine, 0, 0}, /*2*/ {3.585786, 8.585786, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0}, /*3*/ @@ -1477,7 +1477,7 @@ static void test_widen_cap(void) { LineCapArrowAnchor, 10.0, widenline_caparrowanchor_path, ARRAY_SIZE(widenline_caparrowanchor_path), FALSE, TRUE }, { LineCapSquareAnchor, 0.0, widenline_capsquareanchor_thin_path, - ARRAY_SIZE(widenline_capsquareanchor_thin_path), FALSE, TRUE }, + ARRAY_SIZE(widenline_capsquareanchor_thin_path) }, { LineCapSquareAnchor, 10.0, widenline_capsquareanchor_dashed_path, ARRAY_SIZE(widenline_capsquareanchor_dashed_path), TRUE }, };