pygame-ce
pygame-ce copied to clipboard
Draw dashed line
trafficstars
TODO:
- [x] write tests
- [x] fix failures due to conversion from double to int implicitly
Will revive this soon, I promise
I've also noticed that the segments in a line can be drawn with different top/bottom angles to one another. Like so:
I think this is a problem with draw_line_width in draw.c. Not sure I can fix it without messing with that function, and I'm not sure that's the best idea
I will leave a comment so the discussion in #general isn't lost. Problems I've found so far:
- if delay is greater than the line length, a line will be drawn past the end point. I suggest 2 approaches:
- Don't draw anything
- Loop the delay with the % operator ( I prefer this one )
- if start and end makes up to a perfectly vertical line, nothing is drawn