The old SVG parsing was throwaway code and was never part of the public API. I've ripped it out so so it can be done properly. An implementation task list:
[ ] PolyBezier.fromSVG(path) for accepting a full path
[ ] convert any line (LVH) into a quadratic {S, (S+E)/2, E}
[ ] convert any elliptical arc (A) into one or more cubics
[ ] Bezier.fromSVG(pathsegment) for accepting individual curves (note that arcs cannot be supported by this call)
[ ] PolyBezier.toSVG(), as aggregate call for all contained Bezier objects
[ ] remember to replace a b M a b with just a b (because each Bezier toSVG() starts with M)
The old SVG parsing was throwaway code and was never part of the public API. I've ripped it out so so it can be done properly. An implementation task list:
{S, (S+E)/2, E}
a b M a b
with justa b
(because each Bezier toSVG() starts withM
)To make this easier, path normalization can be taken from https://github.com/Pomax/svg-path-reverse/blob/gh-pages/reverse.js