[cairo] Cairo API is all shook up (was: API Shakeup: cairo_create and eliminating cairo_set_target_surface)

Owen Taylor otaylor at redhat.com
Sat May 7 12:22:17 PDT 2005

On Fri, 2005-05-06 at 16:51 -0400, Carl Worth wrote:
> On Thu, 05 May 2005 17:29:31 -0400, Carl Worth wrote:
> > Finally, this is The Big One as far as API Shakeup patches go. This
> > one will break every cairo program that has ever been written. So, I
> > plan to commit this at approximately the same exact time as the other
> > recent patches that also break things, (removing deprecated functions,
> > re-ordering the cairo_operator_t enum, etc.), which should get us
> > more-or-less to what we'll need for the cairo 0.5 
> I just committed this patch along with the simplifying-the-operator-set
> patch and the remove-deprecated patch.
> This does mean that every cairo program I'm aware of is now broken,
> (except for the few in cairo/test). So don't update cairo from CVS
> until you're planning to fix things up.
> I'll be fixing up the cairo-api-update script now and testing it on
> cairo-demo and committing as we go.
> I'll follow up more in the 1.0 release planning thread.

Just to let you know, I went through and updated Pango and GTK+
to the new API ... it all went smoothly. The most typing was 
actually for the removal of cairo_create() rather than the
target surface changes. 

The only potential problem I found was that in a couple of places
I was using cairo_create() without a target surface as a no-op 
drawing target, and had to switch to creating a 1x1 image instead.

It wasn't clear if cairo_create(NULL) was meant to be legal or
not, and even if it is legal, it wasn't really what I wanted, 
since I needed to be able to read back the CTM normally.

I'm not going to campaign for an API addition here, but something
to think about.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050507/2d1ecbf1/attachment.pgp

More information about the cairo mailing list