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

Bill Spitzak spitzak at d2.com
Thu Jan 19 12:37:58 PST 2006


I'm not sure what happened to my suggestion, but it still sounds like it 
is relevant. I'll try to write it again in a simpler way:

For most users the only visible result of my suggestion is that CLEAR 
draws opaque white on the PostScript device, thus the donut example will 
produce the desired output.

This is done by defining the PostScript surface as containing the 
composite of whatever you have drawn over opaque white. This is done by 
replacing all the compositing math with these substitutions:

1. Whenever the alpha of the destination is wanted, 1 is substituted.

2. When a color,alpha pair of c,a is written to the desitnation, instead 
the value c+1-a is written, and there is no need to store the a.

I feel that on a windowing system, drawing CLEAR should produce an 
actual hole through the window through which you can see lower windows. 
If this is not possible then the windowing system does NOT support alpha 
and should not pretend that it does. It should instead act like the 
printer: a blank surface is white, and the alpha of the destination is 1 
at all times.

I agree with other posters here that anybody relying on intersection 
with destination alpha will use a temporary surface and then will OVER 
or copy the result to the destination. Any useful drawing that could not 
be achieved by rearranging the order of drawing requires such 
intermediate surfaces, so supporting destination alpha for any surfaces 
other than temporary ones and ones where the hardware actually uses the 
alpha, is not needed and is a waste of time.


More information about the cairo mailing list