I’m trying to read an SVG file and assign line colors and line thicknesses to the different paths. Inspired by the help patch “Sample the path of an SVG”, I’ve managed to isolate the individual <path>
elements from the SVG, and extract their data somewhat successfully.
However, I’m having trouble getting the nodes ParseSVGPathData
and FromSVGPathData
to work. I’ve attached a screenshot of my patch — any idea what I might be doing wrong?
Also, for my better understanding:
What is the actual difference between ParseSVGPathData
and FromSVGPathData
?
They seem to take the same input (string) and return an SKPath
, but I’m not sure when to use one over the other.