stroke() function with dashed stroke returns first piece last
Graphite wraps Kurbo's [`stroke()`](https://docs.rs/kurbo/latest/kurbo/fn.stroke.html) with our Solidify Stroke node. I am noticing that, when a dashed line (regardless of cap style) is involved, it returns the first piece in the wrong order, at the very end. See this demonstration where we move an object along the edges of each subpath in order, starting from the second piece, going to the last piece, then returning to end with the first piece:
https://github.com/user-attachments/assets/0ded642e-957d-457f-a2d6-3182fdb63e07
I had `stroke()` print out its SVG directly, and I split up each `M` command into its own `<path />` so I can delete each one sequentially to show the ordering issue, directly from Kurbo (not a Graphite node bug):
https://github.com/user-attachments/assets/f4104d00-8105-48a2-945a-1740dbc912db
We can also see that this causes problems assigning colors along a gradient to each separate subpath:
<img width="1261" height="486" alt="Image" src="https://github.com/user-attachments/assets/15aab9cb-633a-4bf2-80b0-709b31e14d65" />
If we add in a more subpaths as part of the input compound path, we see it affects every individual subpath:
<img width="1371" height="779" alt="Image" src="https://github.com/user-attachments/assets/e4e37ca0-cdb7-435e-a95f-e42dbdf56916" />
9 条评论