[Cairo] Ruby/Cairo 0.1

James Henstridge james at daa.com.au
Mon Oct 27 18:50:00 PST 2003

On 27/10/2003 11:53 PM, Evan Martin wrote:

>I've been working on Ruby bindings for Cairo.  I think I have most of
>the hard part done, but I have a few functions/enums left.  (Most of it
>is autogenerated from cairo.h-- thanks for such a consistent header!)
>I'm mostly posting this so there's less possibility of duplicating
>effort, because it's not complete.  However, I have written a bunch of
>test programs with it.
>I'm especially unsure of how to handle the API that deals with X,
>because I'm not sure what the popular way to wrap X in Ruby is.  If
>anyone could point me at a definitive package (Google reveals two) I'll
>work with that.  For now, I have a super-simple X wrapper that's just
>enough to put up a window.
Python is in a similar situation.  For the Python bindings I did, I just 
provided an helper module that could create a cairo surface from a 
GdkDrawable or GdkPixbuf (for Xlib based GTK), so that it would 
integrate with PyGTK.  It should be relatively simple to add similar 
helper modules for other X based toolkits that have Python wrappers.

Given that Owen has expressed interest in using Cairo directly in GTK at 
some unspecified point in the future, the GTK helper module will 
probably disapear when that happens.


Email: james at daa.com.au
WWW:   http://www.daa.com.au/~james/

More information about the cairo mailing list