[OpenJDK 2D-Dev] Java's definition of the SRC operator
linuxhippy at gmail.com
Fri Oct 29 12:50:12 PDT 2010
> blendresult = PORTER_DUFF(rule, rendercolor, dstcolor, extraalpha)
> // For SRC, blendresult = rendercolor modulated by extra alpha
> storedresult = INTERP(dstcolor, blendresult, aacoverage)
> // For full aa coverage, storedresult = blendresult
> The only part of this that could possibly be interpreted as "behaving like
> SRC_OVER" would be the second INTERP and it depends on the aa coverage, not
> on the alpha of the colors involved. Is that what they were talking about?
Thanks for the detailed explanation.
What confuses me is that pixels wich don't have full AA coverage take
the src's alpha into the calculation.
Shouldn't the following operations both yield the same result when
rendered to an opaque destination?
g2d.setColor(new Color(255, 0, 0, 1));
g2d.drawLine(100, 120, 200, 220);
g2d.drawLine(100, 140, 200, 240);
More information about the 2d-dev