[cairo] Avoiding a cairo_bool_t parameter for cairo_quartz_surface_create

Carl Worth cworth at cworth.org
Tue Apr 11 11:41:10 PDT 2006

On Tue, 11 Apr 2006 09:47:58 -0700, Carl Worth wrote:
> On Mon, 10 Apr 2006 16:09:27 -0700 (PDT), Anders Carlsson committed:
> >  
> >  cairo_surface_t *cairo_quartz_surface_create(CGContextRef context,
> > -					     cairo_bool_t flipped,
> > -                                             int width, int height)
> > +					     int width, 
> > +					     int height,
> > +					     cairo_bool_t y_grows_down)
> I may have asked this before. But is there really no way to just ask
> the CGContextRef for the proper value for y_grows_down here?

I've build informed that there isn't any way to query a "correct"
value from the CGContextRef since this y_grows_down thingy is not a
property of the CGContextRef at all.

So, now I have a new question, which is, why is the quartz backend
advertising the ability to create surfaces with two different initial
coordinate systems? No other backend does that.

My claim is that after cairo_quartz_surface_create, a user coordinate
of (0,0) should map the "upper left" corner or the surface in device
space, (just like with every other surface backend).

And here, "upper left" is defined in whatever way is appropriate for
the CGContextRef.

The only justification I could imagine for providing two options here
is if there is an ambiguous notion of "upper left" within the
CGContextRef's view of the world. But I would find that very hard to

Or am I completely missing something?


PS. The PostScript backend, (for example), has a world-view where the
(0,0) coordinate in device-space is at the lower-right. For this
backend, cairo sets up the necessary transformations to provide the
cairo semantics described above (see _cairo_ps_surface_start_page).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060411/b8feacf3/attachment.pgp

More information about the cairo mailing list