[cairo] Editing SVG content with Cairo
kagetsuki at gmail.com
Fri Jan 3 20:01:34 PST 2014
I've already got rendering handled so that's not an issue. As an experiment
I actually did run through the XML and successfully manipulated the colors
of each object... but that's hardly a robust programatically "good"
approach if I want to do anything less trivial than change some colors. I'd
also like to do this just using some base SVG handling libraries as
installing Inkscape will not be an option with some of my deploy targets.
It seems you are saying Cairo can open an SVG as a surface, then draw on
top of it, but has absolutely no functionality to re-instantiate the
objects in the SVG DOM and make them available. If this is true then how
does it handle rendering of the vector objects of the SVG at all? I'm quite
2014/1/4 Simon Sapin <simon.sapin at exyr.org>
> 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.
> 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:
> Simon Sapin
> cairo mailing list
> cairo at cairographics.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo