Library for calculating SVG paths

I am looking for a library with Python bindings that can perform calculations on SVG tracks, such as calculating the length and finding the coordinates of a point on the tracks (i.e., the coordinates of a point 24.4% of the path length).

Already have something?

A C library would also be acceptable, as I can easily create my own Python bindings.

+6
source share
2 answers

OK, so I wrote it and released it as a library.

http://pypi.python.org/pypi/svg.path

+24
source

Try "Inkscape" (IMO's the best SVG editor out there) by looking at their source code and seeing how they do it - and maybe you can reuse your libraries (they have a built-in Python scripting engine) without a big mess.

+1
source

All Articles