gdi32: Skip empty segments at the beginning and end of a line to make sure the caps are correct.
This commit is contained in:
parent
5f2371c229
commit
8b1bab524b
|
@ -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( total != 0 ); /* wide pens should always be drawn through a region */
|
||||||
assert( num >= 2 );
|
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)
|
if (pdev->pen_join == PS_JOIN_ROUND || pdev->pen_endcap == PS_ENDCAP_ROUND)
|
||||||
round_cap = CreateEllipticRgn( -(pdev->pen_width / 2), -(pdev->pen_width / 2),
|
round_cap = CreateEllipticRgn( -(pdev->pen_width / 2), -(pdev->pen_width / 2),
|
||||||
(pdev->pen_width + 1) / 2, (pdev->pen_width + 1) / 2 );
|
(pdev->pen_width + 1) / 2, (pdev->pen_width + 1) / 2 );
|
||||||
|
|
Loading…
Reference in New Issue