inexorabletash / jslogo

Logo in JavaScript
https://calormen.com/jslogo
Other
368 stars 146 forks source link

Skip extra lines when using penup within filled #129

Closed bojidar-bg closed 3 years ago

bojidar-bg commented 3 years ago

I was playing around with a custom fdarc procedure (which moves a specified distance along an arc of some angle), when I noticed that it doesn't work very well with filled, since it draws some extra strokes.

Examples:

Without filled Without this PR With PR
image image image
image image image
image image image

Note that the final example works fine even with the current implementation if one uses penup right at the end of filled. The second example is still messy in that case, though.

inexorabletash commented 3 years ago

Wonderful! Thanks for the fix and the test. Very much appreciated.