linebender / kurbo

A Rust library for manipulating curves
Apache License 2.0
727 stars 70 forks source link

Don't skip first dash in dash pattern #353

Closed dominikh closed 3 months ago

dominikh commented 5 months ago

Before this change, the dash iterator's initial state (before accounting for the dash offset) was "processing first dash, with remaining length of zero", which would cause the iterator to immediately jump to the next component in the dash pattern, effectively skipping the first dash and starting with a gap.

dominikh commented 5 months ago

This change currently breaks for non-zero dash offsets.

Edit: it is ready for review now.

waywardmonkeys commented 3 months ago

@dominikh Could you please rebase this on top of current main to pick up the CI changes / updates? Thanks!

Keavon commented 3 months ago

Thanks for getting to this in your review queue!

Once this lands and it's pulled in by the latest Vello master commit, we can try it out in Graphite to confirm the behavior matches the SVG spec. I'll report back in that Zulip thread if it's working, or file an issue here again if it's not.