<Swing Dev> RFR 8248187: javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java fails with String is not properly drawn
Prasanta Sadhukhan
prasanta.sadhukhan at oracle.com
Wed Jun 24 14:59:14 UTC 2020
Hi All,
Please review a test only fix for an issue seen in ubuntu linux 20.04.
The test draws "AOB" with and without underline underneath and then
looks to try to calculate the midpoint of "O" and then expects to see
the transition
from top to bottom of bg->fg->bg->fg->bg as you get when you cross the
path of the O twice. When there is underline, it expects 6 transition
from top of O till it passes the underline in form of
bg->fg->bg->fg->bg->fg->bg and when there is no underline, it expects 4 transitions.
However, it is seen that the string width of AOB is calculated to be 59 whereas the Bufferedimage width is hardcoded to 50 resulting in -ve x (which is calculated as 50-59/2)
Proposed fix is to always draw at x=0 coordinate instead of using the calculated x. Also, the x corodinate passed to check function is modified a liitle depending on whether we are testing underline or not.
Proposed fix pass in all platforms and the mach5 job link is present in JBS.
Bug: https://bugs.openjdk.java.net/browse/JDK-8248187
webrev: http://cr.openjdk.java.net/~psadhukhan/8248187/webrev.0/
Regards
Prasanta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/swing-dev/attachments/20200624/51ae4f2d/attachment.htm>
More information about the swing-dev
mailing list