Re: Editing SVG content with Cairo
David Young <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Jan 04, 2014 at 12:46:58PM +0900, 影月 零 wrote: > I mean open the SVG, then iterate through all the vector objects in it and > alter them somehow; like change the color attribute or make all their lines > into dashed lines. > > To be more sepcific, I would like to be able to open an SVG, iterate > through each vector object in it applying some change along the way, then > write out a new SVG. > > At the moment I'm using RSVG[2] and Cairo, but I'm assuming it's Cairo that > does all the actual image manipulation. I guess my question could also be > re-phrased as: > Does Cairo or any other library re-instantiate objects from items in the > DOM of an SVG file when it opens them? If so where are they and how can I > iterate over them? It sounds like you're looking for the "scene graph," <http://en.wikipedia.org/wiki/Scene_graph>, corresponding to the SVG. AFAIK, Cairo isn't based on a scene graph. Dave -- David Young [email protected] Urbana, IL (217) 721-9981 -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo