To 'display' the SVG file in a gtk.DrawingArea is quite simple. Just use
the Cairo source_pixbuf .

This code should help you to open files and 'draw' them in a
gtk.DrawingArea:

http://www.islascruz.org/html/index.php?Blog/SingleView/id/Como-dibujar-un-imagen-jpg-png-gif-etc-en-Cairo

Sorry about the fact that it is in spanish but the code is still in
pythonish.



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   [email protected]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
<--Linux... Because I'm Free-->
Marco Antonio Islas Cruz
"Markuz"
Linux User #280229
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.islascruz.org
http://sourceforge.net/projects/gpkg/
http://www.linuxpozarica.com

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to