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

Steve Chaplin stevech1097 at yahoo.com.au
Sat Mar 17 18:44:01 PDT 2007


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


Send instant messages to your online friends http://au.messenger.yahoo.com 


More information about the cairo mailing list