You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to read SVG files which were created with potrace using a scaling parameter -u 10. This results in a SVG with a transform group (translation 0, 0, scale 0.1, -0.1). I figured out that the path coordinates are all 10x larger than expected from reading the viewBox in svg_attributes, thus I wanted to get at least the information if a scale transform has been defined in the file. I could not find a way to extract this using the API and ended in an ugly index-search for "scale(" and the following ")" in str(svgpathtools.Document(file)) to get these numbers. Is there a more elegant way to get this transform info? I thought it might be a "group" since it's in a g tag, but I couldn't get Document(file).contains_group or get_group to work.
I have seen a fork which attempts to "flatten" the transform, but I think this has not been merged. Would it be an alternative
to transform the viewBox instead of the paths and add translate/scale items to svg_attributes?
The text was updated successfully, but these errors were encountered:
I'm trying to read SVG files which were created with potrace using a scaling parameter -u 10. This results in a SVG with a transform group (translation 0, 0, scale 0.1, -0.1). I figured out that the path coordinates are all 10x larger than expected from reading the viewBox in svg_attributes, thus I wanted to get at least the information if a scale transform has been defined in the file. I could not find a way to extract this using the API and ended in an ugly index-search for "scale(" and the following ")" in str(svgpathtools.Document(file)) to get these numbers. Is there a more elegant way to get this transform info? I thought it might be a "group" since it's in a g tag, but I couldn't get Document(file).contains_group or get_group to work.
I have seen a fork which attempts to "flatten" the transform, but I think this has not been merged. Would it be an alternative
to transform the viewBox instead of the paths and add translate/scale items to svg_attributes?
The text was updated successfully, but these errors were encountered: