[cairo] Editing SVG content with Cairo
Simon Sapin
simon.sapin at exyr.org
Sat Jan 4 03:00:03 PST 2014
On 04/01/2014 04:01, 影月 零 wrote:
> It seems you are saying Cairo can open an SVG as a surface,
What makes it seem so?
This is not the case as far as I’m aware.
Are you thinking of the RSVG library? It’s not part of cairo. It’s also
only a renderer and does not seem to be designed to do anything else.
> 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 confused here!
You may want to look at CairoSVG (another renderer, in Python) and mess
with it’s internal tree representation, but that’s little more than the
XML tree.
http://cairosvg.org/
https://github.com/Kozea/CairoSVG/blob/master/cairosvg/parser.py
--
Simon Sapin
More information about the cairo
mailing list