[cairo] Re: cairo c++ bindings

chris nuernberger cnuernber at gmail.com
Wed Nov 23 10:58:42 PST 2005


I have _not_ written a wrapper, so pardon my questions if they seem
naive.  They are.

First off, deriving from structs isn't a hack.  There are well-defined
rules and c++ wouldn't work in general if there weren't.  If you
aren't doing multiple inheritance, you are fine.  If you are, then the
compiler will do the pointer arithmetic necessary when you cast your
object into one of the parent objects.

Why hide the cairo headers?  It seems like adding the full abstraction
with code generation for enumerations and all that jazz is getting a
long way away from the kiss principle.

I personally like the 'everything in a header' approach to the
wrapper.  Using doxygen, it would take about 10 seconds to document,
it should match exactly the semantics of the c library, and you can
get the core cairo objects if you want to.

Chris


More information about the cairo mailing list