----- Original Message Follows -----
Subject: [Goocanvas-devel] (py)goocanvas SVG export
Date: Mon, 15 Jan 2007 20:16:54 -0500 (EST)
> Hi all,
> I'm trying to take the objects that I have created in a
> pygtk/pygoocanvas app and save them as an SVG file. Could
> anyone point me in the right direction?
sure, using pycairo should be as easy as:
surface = cairo.SVGSurface ("demo.svg", 9 * 72, 10 * 72)
cr = cairo.Context (surface)
# center in the page (9x10)
cr.translate (20, 130)
canvas.render (cr, None, 1.0)
> Any python-specific help would be ideal, but I greatly
> appreciate any suggestions at all.
let us know if it does work for you.
Gian Mario Tagliaretti
From: Steve Cresawn <email@example.com> - 2007-01-16 19:49:17
> surface = cairo.SVGSurface ("demo.svg", 9 * 72, 10 * 72)
> cr = cairo.Context (surface)
> # center in the page (9x10)
> cr.translate (20, 130)
> canvas.render (cr, None, 1.0)
> cr.show_page ()
> let us know if it does work for you.
Thanks very much for taking the time to help. Your suggestion worked
perfectly for SVG, and I also tried cairo.PDFSurface and cairo.PSSurface
with great results.