Re: [pygame] Re: `pygame.draw.line(...)` `width`

2018-04-28 Thread Al Sweigart
I'd also be in favor of this change to squared-off miter joints. I've noticed the odd endcap behavior in Pygame a long time ago, and it's one reason that I never used the line drawing function for lines with large widths. -Al On Sat, Apr 28, 2018 at 1:35 PM, Ian Mallett wrote: > ​By the way, a

[pygame] Re: `pygame.draw.line(...)` `width`

2018-04-28 Thread Ian Mallett
​By the way, a solution doesn't even need to use any trigonometry, because a squared-off miter joint is by-definition orthogonal to the line. Here's some proof-of-concept code: def rndint(x): return int(round(x)) def cappedline(surface, color, p0,p1, width=1, rounded=True): radius = width * 0.