Module: wine Branch: master Commit: 26ffbf6b8c8bce461b1387e93e31e2d3aab25581 URL: https://source.winehq.org/git/wine.git/?a=commit;h=26ffbf6b8c8bce461b1387e93...
Author: Jeff Smith whydoubt@gmail.com Date: Tue Feb 18 23:51:57 2020 -0600
gdiplus: Fix LineCapRound path widening.
Signed-off-by: Jeff Smith whydoubt@gmail.com Signed-off-by: Vincent Povirk vincent@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/gdiplus/graphicspath.c | 2 ++ dlls/gdiplus/tests/graphicspath.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 7ec6061cb4..5ea82f4d0e 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1955,6 +1955,8 @@ static void widen_cap(const GpPointF *endpoint, const GpPointF *nextpoint, *last_point = add_path_list_node(*last_point, endpoint->X - dy, endpoint->Y + dx, PathPointTypeBezier); } + else if (add_last_point) + add_bevel_point(endpoint, nextpoint, pen, 0, last_point); break; } case LineCapTriangle: diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c index e12d9e2c49..91b83166ad 100644 --- a/dlls/gdiplus/tests/graphicspath.c +++ b/dlls/gdiplus/tests/graphicspath.c @@ -1260,8 +1260,8 @@ static path_test_t widenline_capsquare_path[] = { };
static path_test_t widenline_capround_path[] = { - {5.0, 5.0, PathPointTypeStart, 0, 2}, /*0*/ - {50.0, 5.0, PathPointTypeLine, 0, 1}, /*1*/ + {5.0, 5.0, PathPointTypeStart, 0, 0}, /*0*/ + {50.0, 5.0, PathPointTypeLine, 0, 0}, /*1*/ {52.761421, 5.0, PathPointTypeBezier, 0, 0}, /*2*/ {55.0, 7.238576, PathPointTypeBezier, 0, 0}, /*3*/ {55.0, 10.0, PathPointTypeBezier, 0, 0}, /*4*/ @@ -1379,7 +1379,7 @@ static void test_widen_cap(void) { LineCapSquare, widenline_capsquare_path, ARRAY_SIZE(widenline_capsquare_path) }, { LineCapRound, widenline_capround_path, - ARRAY_SIZE(widenline_capround_path), TRUE }, + ARRAY_SIZE(widenline_capround_path) }, { LineCapTriangle, widenline_captriangle_path, ARRAY_SIZE(widenline_captriangle_path), TRUE }, { LineCapNoAnchor, widenline_capflat_path,