[pygtk] Drawing SVG to a gtk.DrawingArea

Donn donn.ingle at gmail.com
Thu Nov 1 20:17:29 WST 2007


Hi again,
I have poked-around the net, but not found a simple example to:
1. Open an svg file
2. Draw it to a gtk.DrawingArea

I am also confused about how that would/would not fit into pycairo - is cairo 
used to draw the svg, or is it done directly by something else?
Is there any way to get pycairo statements from an svg? I mean, given an svg 
file, get cairo
        cr.set_line_width(0.1)
        cr.set_source_rgb(0, 0, 0)
        cr.rectangle(0.25, 0.25, 0.5, 0.5)
        cr.stroke()
commands out that would draw the thing.

I am aiming at paths really, closed paths that are filled.

\d


More information about the pygtk mailing list