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

Carl Worth cworth at
Fri Jan 20 12:17:08 PST 2006

On Fri, 20 Jan 2006 11:29:34 -0800, Bill Spitzak wrote:
> If you make a COLOR window, and draw CLEAR into it, do you get
> black?


> If you make a COLOR_ALPHA and draw CLEAR into it, and then copy it to a 
> COLOR surface, do you get black?

"Copy" meaning what?

If you mean drawing with CAIRO_OPERATOR_SOURCE then, yes you will get
black in that case. But most of the time, people drawing one surface
to another will be using CAIRO_OPERATOR_OVER, (which is the default)
and the cleared portions will result in no change to the destination
surface in this case.

That's the kind of behavior I want to preserve and it's something that
makes a lot of intuitive sense with ink on paper.

> My proposal really amounts to changing the behavior of *all* COLOR 
> surfaces so that CLEAR draws white, and so that copying a COLOR_ALPHA 
> surface into the COLOR one puts c+1-a into each pixel.

Since we're post 1.0 I don't think changing the semantics of existing
surfaces is even an option.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the cairo mailing list