linebender / resvg

An SVG rendering library.
Apache License 2.0
2.84k stars 229 forks source link

Extracting densely sampled straight line segments from curves #718

Closed arcadeperfect closed 9 months ago

arcadeperfect commented 9 months ago

Hello,

I am trying to extract a pre-sampled path of straight line segments, or something that allows me to sample a given path at arbitrary point t, that can represent a curve at reasonable resolution, for passing to physical plotter. Can this be achieved with the library or will I have to implement my own cubic / quad interpolation according to the verbs in the Path struct?

RazrFalcon commented 9 months ago

This is not supported, but you can use kurbo for that. Example. resvg/usvg are just for parsing and rendering.

arcadeperfect commented 9 months ago

Thanks for the reply, I will look at kurbo