[cairo] surface SVG to current context
Dirk Schönberger
dirk.schoenberger at sz-online.de
Fri Dec 14 00:05:49 PST 2007
>> cairo can't read from SVG files only write to them. You can render a
>> SVG into any type of surface using librsvg.
> I was under the impression that it could -- from the last few days of
> reading
> posts and docs.
> The word "source" tends to lend the suggestion that it's input.
> cr.SVGSurface() does not suggest any kind of writing *to* the file --
> beware
> your SVG files people.
>
> I am pretty sure that Carl wrote a demo recently that opened a PDF changed
> it
> and outputted a PDF. I am sure that SVG should behave the same way as PDF.
>
> I checked and the pyCairo PDFSurface() also erases the file - I am as sure
> as
> I can be that this is not the right behaviour.
>
Yes, Carl did that. But he was using poppler respective rsvg, libraries
which are outside the scope of cairo.
A cairo surface is output only. The fact that it can be used as input is
purely coincidental (and is part of the non-obviousness of cairo)
What I still think is missing is some way to serialize / deserialize a
stream of cairo commands into a file, which is part of cairo, basically a
meta file system.
Regards
Dirk
More information about the cairo
mailing list