PS/PDF API Change Proposal: (Re: [cairo] Semantics of transparent objects)

Keith Packard keithp at
Wed Jan 18 12:22:18 PST 2006

On Wed, 2006-01-18 at 12:07 -0800, Carl Worth wrote:
> On Wed, 18 Jan 2006 11:12:43 -0800, Keith Packard wrote:
> > 
> > Seems like these are more likely associated with the surface and not the
> > drawing state.
> This isn't as obvious to me, though you may be correct.

I'm just trying to keep surface attributes associated with the surface
and drawing attributes associated with the rendering context. Size,
orientation and other things seem like surface attributes to me, not
rendering context.
> How is that fundamentally "better" than the following?

It's not, and your code is shorter. Passing the surface to
set_page_options would make them functionally equivalent. Note that some
libraries encourage transient cairo_t creation (like Gtk+), so keeping
persistant information in the surface might be a better way ot
respecting that design.

> So what's the guiding principle that says where this new functionality
> belongs?

I think it's pretty clear -- surface attributes belong in the surface
object, and rendering state belongs in the context. I can't think of any
ambiguous data immediately, I expect we will in the future though, at
which point we can refine this statement as needed.
> 	cairo_xlib_surface_set_size

This follows the proposed principle.

keith.packard at
-------------- 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 :

More information about the cairo mailing list