[cairo] Editing SVG content with Cairo

Simon Sapin simon.sapin at exyr.org
Fri Jan 3 11:26:03 PST 2014


On 03/01/2014 19:02, 影月 零 wrote:
> Is it possible to edit the content of an SVG image and then save the
> result back? I don't mean just drawing on top of the image, I mean
> manipulating objects/vectors within the image. I've been searching but
> haven't found a good sample or explanation of how this would be done, if
> it is possible.

Hi,

cairo itself does not read or otherwise render SVG files. (There are SVG 
renderers based on cairo, though.)

You could use an XML parser and manipulate XML elements.

Or look into making an Inkscape extension:
http://wiki.inkscape.org/wiki/index.php/ScriptingHOWTO

-- 
Simon Sapin


More information about the cairo mailing list