This is a bug thats been around for years, but with the release of
jdk 1.5.0 a new bug has been added. The original problem related to
the TextLayout.getBounds() call returning an incorrect bounding box.
But now not only are the bounding boxes incorrect, the string is also
drawn incorrectly for arbitrary angles. I've included the code for a
simple example demonstrating the problem and images running this
example on Windows 2000 and jdk1.5, Mac OSX running 1.4.2 and 1.5.0.
The blue box is the getPixelBounds and the red box the
TextLayout.getBounds(). The PixelBounds are suppose to be correct to
the nearest pixel, the other is approximate. You'll notice that the
two boxes are not identical using the Sun VM, but are very close. On
Mac OSX and jdk 1.5.0 the two boxes are identical and both wrong! On
1.4.2, they are both wrong, but in different ways.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden