Create cairo path from SVG file

时光毁灭记忆、已成空白 提交于 2019-12-23 15:02:07

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/13709243/create-cairo-path-from-svg-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!