[OpenJDK 2D-Dev] Handling of premultication in the D3D & OGL pipelines
Clemens Eisserer
linuxhippy at gmail.com
Tue Oct 1 05:52:20 UTC 2013
Hi,
I am currently testing compatibility of the xrender pipeline with
different composition operations, and I noticed for AlphaComposite.SRC
the D3D and OGL pipelines store pre-multiplied colors in surfaces
without an alpha-channel.
For example the following code results in a black rectangle, instead
of a red one when rendering to a BufferedImage of type INT_RGB:
((Graphics2D) g).setComposite(AlphaComposite.Src);
g.setColor(new Color(255, 0, 0, 2));
g.fillRect(10, 10, 100, 100);
Is this intentional or should it be considered a bug?
Thanks, Clemens
More information about the 2d-dev
mailing list