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

Robert O'Callahan rocallahan at novell.com
Mon May 9 14:57:10 PDT 2005

On Mon, 2005-05-09 at 13:57 -0400, Carl Worth wrote:
> On Mon, 09 May 2005 14:41:41 +1200, Robert O'Callahan wrote:
> > I'm updating our code too. We create contexts with no surface to do
> > measurement and hit-testing on paths, so I'd vote for some API for this.
> Similarly, someone in IRC said they wanted to create an intermediate
> surface for some text, which requires the size of the text first,
> which requires a cairo_t, but which then requires a cairo_surface,
> (which is what the user is still trying to create). So that resulted
> in some user frustration as well.
> Together, these two experiences suggest to me that the API is missing
> something after the recent change of cairo_create. But it's not clear
> to me what the right answer is.

I'd be happy with either a new "/dev/null" surface type, or the ability
to create a cairo_t with no target surface. I'd slightly prefer the
latter. I'd prefer a dedicated API function rather than
cairo_create(NULL). "cairo_create_no_target()"?


More information about the cairo mailing list