pygame-ce icon indicating copy to clipboard operation
pygame-ce copied to clipboard

Draw dashed line

Open oddbookworm opened this issue 2 years ago • 3 comments
trafficstars

TODO:

  • [x] write tests
  • [x] fix failures due to conversion from double to int implicitly

oddbookworm avatar Jul 23 '23 21:07 oddbookworm

Will revive this soon, I promise

oddbookworm avatar Nov 26 '23 20:11 oddbookworm

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

oddbookworm avatar Dec 24 '23 00:12 oddbookworm

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

damusss avatar Jun 13 '24 18:06 damusss