[Cairo] another set of Python bindings
Maarten Breddels
dmon at xs4all.nl
Thu Sep 11 10:30:51 PDT 2003
> I have put together some prototype Python bindings for Cairo.
> These are
> not based on Maarten Breddels' bindings, which I didn't know
> about when
> I started mine.
Pycairo didn't show any result on google, so I assumed it didn't exist.
> * cairo_status() is called to check the status of cairo_t
> operations, and raise exceptions as appropriate.
Good idea :)
> If GTK were to support Cairo, it is quite likely that there would be
> functions that return a cairo_t or cairo_surface_t, while not
> transfering ownership. In this case, it would be bad if the wrapper
> destroyed the context or surface. I could add a "don't free
> this object
> on destruction", but then we might run into a similar problem
> where the
> object context or surface gets destroyed unexpectedly.
>
> A reference count would be the most robust way to handle this, and
> shouldn't be difficult to implement.
Also a good idea.
I don't mind giving up my project if you feel you can give maintain it
and think it does everything(or more) my binding does. I don't support
fonts in my binding, and only tried it out on Windows. But linux/unix
shouldn't be a problem thanks to SWIG. I hope I have some time this
weekend(just started at university) to check out your binding.
What is nice about SWIG is that making binding to other
scripts/languages is quite simple, Java, C#, Perl, Ruby, Tcl should be
possible.. I think :)
Maarten
More information about the cairo
mailing list