mathandy / svgpathtools

A collection of tools for manipulating and analyzing SVG Path objects and Bezier curves.
MIT License
557 stars 142 forks source link

Missing svg namespace for path elements added to doc tree using document.add_path() #144

Open neel-stark opened 3 years ago

neel-stark commented 3 years ago

https://github.com/mathandy/svgpathtools/blob/3a1fe8695dd6236af81b5477714e74a094e3b088/svgpathtools/document.py#L327

Inskscape is not able to recognize the paths added using add_path(), due to the missing svg namespace.

the following modification, (similar to what has been implemented for adding groups in line 415 of the same file (document.py)) solves the issue:

return SubElement(group, '{{{0}}}path'.format(SVG_NAMESPACE['svg']), attribs)