I had an application running under JDK 1.3 that created antialiased text in
a buffer of TYPE_INT_ARGB that was then stored in a png file with an alpha
channel - worked great. Here is a fragment of an image that illustrates the
quality:
http://www.adlibmedia.com/pngs/video_graphicJDK1.3.png
(notice white text with black drop shadow, grey antialiase pixels and alpha
channel)

but under JDK 1.4.2, the font got wider and taller (by about 1 pixel) and
some of the antialiased pixels are now brown or blue instead of gray.  Here
is a fragment of the image that demonstrates the problem:
http://www.adlibmedia.com/pngs/video_graphicJDK1.4.2.png

Here is a code fragment that prints the shadow or the foreground
    /*
    **  This method adds a line of left-justified text to the current
    **  graphic.
    */
    public static void addLeftJustifiedText(String s, Graphics2D g2d, float
xPos, float yPos)
    {
        // get the font render context and calculate the position
        FontRenderContext fntCntxt = g2d.getFontRenderContext();
        Rectangle2D bounds = g2d.getFont().getStringBounds(s, fntCntxt);
        g2d.drawString(s, xPos, yPos);
    }

I'm scratching my head trying to figure it out.  I looked at the archive for
this list and didn't see anything.  I set every hint I could find.  I'm
guessing something basic and obvious changed that I'm missing in the
documentation.

Any suggestions?

Thank you,
Michael Slade

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to