[cairo] pycairo missing functions

Steve Chaplin stevech1097 at yahoo.com.au
Mon Nov 1 19:04:44 PST 2004


On Tue, 2004-11-02 at 00:47, Carl Worth wrote:
> On Sun, 31 Oct 2004 21:39:21 +0800, Steve Chaplin wrote:
> > I've started using pycairo and needed to use 
> > cairo_set_target_png()
> > cairo_set_target_ps()
> > cairo_show_page()
> > which were not available.
> > 
> > Here's the additions I made to pycairo-context.c to get them to work.
> 
> Hi Steve,
> 
> Thanks so much for your contribution.
> 
> I've just committed these new functions. I also added support for
> cairo_copy_page while I was at it.
> 
> I haven't tested these at all. Steve, presumably you've got a working
> program that exercises these functions. Would you consider cooking up a
> minimal PNG-based example that we could include in the pycairo
> distribution?
> 
> -Carl
The two set_target_*() routines had problems - they didn't give python
access to the file object to flush or close it, so I've updated them and
attach a patch.
Also attached is pycairo PNG example and a PS example.

Another format I would like to use is SVG, I was expecting there to be a
"cairo_set_target_svg()" function but did not find one. I know libsvg
can parse SVG files and libsvg-cairo can render SVG, but can they write
SVG files?

Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hering.py
Type: application/x-python
Size: 1196 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20041102/01bcaa32/hering.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spiral.py
Type: application/x-python
Size: 1185 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20041102/01bcaa32/spiral.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pycairo-context.c.patch
Type: text/x-patch
Size: 2156 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20041102/01bcaa32/pycairo-context.c.bin


More information about the cairo mailing list