[cairo] Re: Language binding appendix

Steve Chaplin stevech1097 at yahoo.com.au
Sun May 8 19:03:20 PDT 2005

On Sun, 2005-05-08 at 13:35 -0700, cairo-request at cairographics.org
> On Tue, 2005-05-03 at 00:23 -0400, Owen Taylor wrote:
> > I've started writing an appendix to the Cairo manual to cover this
> > stuff; I'm not quite ready to commit to CVS, but I should be able to get
> > something done in the next few days.
> > 
> > Once something is initially in place, I hope that language binding
> > authors will take an active role in maintaining this part of the
> > documentation.
> This can now be seen at:
>   http://cairographics.org/~otaylor/manual/

I read through the appendix and found it very useful.

The "Memory Management" section says "Derivation from the language
object doesn't work because you can lose the language object while
keeping the Cairo object. ... it's probably best to simply forbid
deriving from the language objects."

This applies specifically where cairo provides cairo_get_*() functions
that return the cairo object and you can't tell which language binding
object should be used for that cairo object.
So it applies to surfaces, patterns, matrices, etc which have
cairo_get_target/source/matrix(). But I don't think it applies to the
cairo context itself, which I think is still safe to derive from /


More information about the cairo mailing list