[pygtk] Drawing SVG to a gtk.DrawingArea
Dieter Verfaillie
dieterv at optionexplicit.be
Fri Nov 2 15:33:24 WST 2007
Hi,
rsvg (http://library.gnome.org/devel/rsvg/stable/) claims to be the
library to render svg files to gdk pixbufs or cairo contexts. Haven't
had much succes with it tough (blurry render) but ymmv.
It has python bindins in the gnome-python-desktop package.
Dieter
On Thu, 2007-11-01 at 13:17 +0200, Donn wrote:
> 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
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20071102/1fc85f86/attachment.pgp
More information about the pygtk
mailing list