jitos
jitos

Reputation: 41

Create cairo path from SVG file

There must be something I am missing.

I am on Windows and want to use python to take the paths from a SVG-file, scale them an place every single one of them on a new surface (or all on one, that doesn't really matter).

I read about cairo here and on stackoverflow and it seemed to me, that it would fit my needs, but I could not find an easy way to generate a path from a svg file. Is there no easier solution than parsing the SVG by hand eg. with xml?

Upvotes: 4

Views: 1797

Answers (1)

Simon Sapin
Simon Sapin

Reputation: 10180

CairoSVG parses SVG files and renders them to cairo: http://cairosvg.org/

If you only want a single path, it should be possible to use just the right functions from CairoSVG. Feel free to ask on the tracker

Upvotes: 2

Related Questions