[cairo] Re: [cairo-announce] ANN: pycairo release 1.4.0 now available

Hugo Vincent hugo.vincent at gmail.com
Sat Mar 17 22:12:12 PDT 2007

> Date: Sun, 18 Mar 2007 09:44:01 +0800
> From: Steve Chaplin <stevech1097 at yahoo.com.au>
> Subject: Re: [cairo] [cairo-announce] ANN: pycairo release 1.4.0 now
> 	available
> To: Dethe Elza <delza at livingcode.org>
> Cc: cairo at cairographics.org
> Message-ID: <1174182241.2781.11.camel at localhost.localdomain>
> Content-Type: text/plain
> On Fri, 2007-03-16 at 21:36 -0700, Dethe Elza wrote:
>> This is great news, Steve, thanks for keeping the python bindings
>> caught up with the latest Cairo.
>> Does this by any chance support the Quartz backend, and if not, what
>> would it take to hook PyCairo up to Quartz?
> There is no Quartz support in Pycairo. Note that in cairo the Quartz
> backend is still experimental and not supported.
> Using Quartz from Pycairo would require a Quartz user write and test a
> QuartzSurface(Surface) class to be added to cairo/pycairo-surface.c
> The new class would wrap the cairo C functions:
> cairo_surface_t *
> cairo_quartz_surface_create (cairo_format_t format,
>                              unsigned int width,
>                              unsigned int height);
> cairo_surface_t *
> cairo_quartz_surface_create_for_cg_context (CGContextRef cgContext,
>                                             unsigned int width,
>                                             unsigned int height);
> CGContextRef
> cairo_quartz_surface_get_cg_context (cairo_surface_t *surface);
> The first function prototype looks like it should be easy to do. The
> second and third use CGContextRef, which I understand is a pointer,  
> and
> can't used by pycairo unless there is a preexisting python binding for
> CGContextRef.
> Regards
> Steve

As it happens, there are preexisting Python bindings for CGContextRef  
and it ships with Mac OS, although they are proprietary and binary-only.



Unfortunately, I suspect with the implementation details hidden from  
us (seeing as these bindings are proprietary) it may not be of any  
use for this purpose.

More information about the cairo mailing list