[cairo] Quartz + py-cairo

Steve Chaplin stevech1097 at yahoo.com.au
Tue Jan 9 19:03:32 PST 2007


On Tue, 2007-01-09 at 10:19 -0800, Dethe Elza wrote:
> Hi folks,
> 
> I've installed cairo 1.2.4 (+quartz variant) and py-cairo 1.2.2 via  
> macports.  The Quartz surface doesn't appear to be installed, but  
> perhaps I'm doing something wrong (just getting started with cairo,  
> though I've been lurking on the list for a few months).  My goal is  
> to use cairo as natively as possible, via python, in a window.   
> Eventually I hope to be able to use cairo to port my NSBezierPath- 
> based Cocoa application to Linux and Windows. Any pointers for  
> getting started would be appreciated.
> 
> --Dethe

There currently is no Quartz surface in pycairo. It would require a
Quartz user to develop and test the code for the new surface.

It looks like cairo actually supports two Quartz surfaces:
1) 'quartz'
cairo_surface_t *
cairo_quartz_surface_create (CGContextRef    context,
			     int	     width,
			     int	     height,
			     cairo_bool_t    y_grows_down);

CGContextRef may be a problem. If its really a C type (like an int),
then pycairo bindings can be written for this function. But if its some
custom type then there would need to be existing python bindings for it
with a C API that pycairo can use in order to access the CGContextRef.

2) 'nquartz'
cairo_surface_t *
cairo_nquartz_surface_create (cairo_format_t format,
                              unsigned int width,
                              unsigned int height);
This looks more straightforward to create pycairo bindings for.

Steve

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


More information about the cairo mailing list