[cairo] surface SVG to current context

Donn donn.ingle at gmail.com
Fri Dec 14 02:33:47 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.

The basic recipe is:
Input Surface (file) -> Pattern -> Mask -> Clip -> Surface (output)
And this breaks down at step 1.

BTW - thanks for the layers metaphor, it's actually quite good.

\d


More information about the cairo mailing list