Re: Editing SVG content with Cairo

影月 零 <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CA+JGUxRgJbkNx44kevyftJTjgMPQO0iqUZq2d2G=VY3HeRuqhQ@mail.gmail.com>
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?

Thanks,
-Rei


2014/1/4 Bryce W. Harrington <[email protected]>

> On Sat, Jan 04, 2014 at 04:02:26AM +0900, 影月 零 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.
>
> Clarify what you mean by 'edit'.  You can certainly edit the XML in an
> editor, or graphically via inkscape, but you probably already know that,
> so I assume you want to do something different?
>
> Bryce
>
> > Thanks,
> > -Rei
>
> > --
> > cairo mailing list
> > [email protected]
> > http://lists.cairographics.org/mailman/listinfo/cairo
>

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.