Alexandre Julliard : gdi32: Skip empty segments at the beginning and end of a line to make sure the caps are correct .
Module: wine Branch: master Commit: 8b1bab524b4cfe72a6d7eebbe2698626d456ca7b URL: http://source.winehq.org/git/wine.git/?a=commit;h=8b1bab524b4cfe72a6d7eebbe2... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 4 15:10:10 2012 +0100 gdi32: Skip empty segments at the beginning and end of a line to make sure the caps are correct. --- dlls/gdi32/dibdrv/objects.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/dibdrv/objects.c b/dlls/gdi32/dibdrv/objects.c index 879d920..9f4f035 100644 --- a/dlls/gdi32/dibdrv/objects.c +++ b/dlls/gdi32/dibdrv/objects.c @@ -1334,6 +1334,10 @@ static BOOL wide_pen_lines(dibdrv_physdev *pdev, int num, POINT *pts, BOOL close assert( total != 0 ); /* wide pens should always be drawn through a region */ assert( num >= 2 ); + /* skip empty segments */ + while (num > 2 && pts[0].x == pts[1].x && pts[0].y == pts[1].y) { pts++; num--; } + while (num > 2 && pts[num - 1].x == pts[num - 2].x && pts[num - 1].y == pts[num - 2].y) num--; + if (pdev->pen_join == PS_JOIN_ROUND || pdev->pen_endcap == PS_ENDCAP_ROUND) round_cap = CreateEllipticRgn( -(pdev->pen_width / 2), -(pdev->pen_width / 2), (pdev->pen_width + 1) / 2, (pdev->pen_width + 1) / 2 );
participants (1)
-
Alexandre Julliard