[OpenJDK 2D-Dev] Strange text rendering with SRC + Extra Alpha
Denis Lila
dlila at redhat.com
Wed Oct 27 21:06:15 UTC 2010
Hi Clemens.
It's interesting to note that this doesn't happen on OpenJDK, and
on closed java the subpixel hint is not necessary to reproduce this.
Simply using VALUE_ANTIALIAS_ON and the SRC composite is enough.
Regards,
Denis.
----- "Clemens Eisserer" <linuxhippy at gmail.com> wrote:
> Hi,
>
> While playing arround with the SRC composition rule I found what
> seems
> to be a bug.
> When rendering text with an AlphaComposite(SRC, EA) I get garbage
> when
> enabling subpixel antialising:
>
> g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC,
> 0.01f));
> g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
> RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_VBGR);
>
> g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
>
> g2d.setColor(Color.black);
> g2d.drawString("This text is painted with black color", 50,
> 50);
>
> If I comment out the KEY_ANTIALIASING hint, which shouldn't have any
> effect on text rendering, extra alpha is ignored but the text is
> rendered correctly.
>
> Should I file a but?
>
> Thanks, Clemens
More information about the 2d-dev
mailing list