Name: atR10191 Date: 03/19/2002
specification for the class AlphaComposite states:
" ...
The alpha resulting from the compositing operation is stored in the
destination if the destination has an alpha channel. Otherwise, the resulting
color is divided by the resulting alpha before being stored in the destination
and the alpha is discarded. If the alpha value is 0.0, the color values are
set to 0.0.
"
The questions are:
1.How color is divided? Does it mean that it's red, green and blue
components are divided by the value?
2.What does "alpha is discarded" mean? Does it become 1.0f or 0.0?
Note also that specification for the static members of the class do
not recall about this.
For example, CLEAR:
"...
Fs = 0 and Fd = 0, thus:
Cd = 0
Ad = 0
"
But when "alpha is discarded", Ad becomes 1.0.
It's quite confusing and ambiguous.
Another contradictory place is the following:
"A constant alpha value can also be specified to be multiplied with the alpha
value of the source pixels.
The following abbreviations are used in the description of the rules:
Cs = one of the color components of the source pixel.
Cd = one of the color components of the destination pixel.
As = alpha component of the source pixel.
Ad = alpha component of the destination pixel.
Fs = fraction of the source pixel that contributes to the output.
Fd = fraction of the input destination pixel that contributes to the output.
"
I guess that "A constant alpha value ... " refers to Fs.
So fraction is alpha.
I think it would be much better to name the same thing with the same
term, especially in the complicated documentation.
And I think "fraction" is better than "alpha", because there is
"alpha value of the source pixels" already.
See for example spec for Src field:
"AlphaComposite object that implements the opaque SRC_OVER rule with an alpha
of 1.0f."
Here I guess alpha is not "alpha value of the source pixels" but rather Fs.
It's quite confusing.
======================================================================