United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6751621 TextLayout.getBounds() doesn't account for strike through
JDK-6751621 : TextLayout.getBounds() doesn't account for strike through

Details
Type:
Bug
Submit Date:
2008-09-23
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2009-01-09
Component:
client-libs
OS:
generic
Sub-Component:
2d
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.0,6
Fixed Versions:

Related Reports
Backport:
Duplicate:

Sub Tasks

Description
TextLayout.getBounds() will return a bounds that does not account for
any strike through. This is apparent if the text begins or ends with a space.
This is an oversight and it requires the same treatment as is being given to
an underline.

But underline isn't returning bounds that completely enclose the rendering
either, although its a very small error.

The reason for this is that the rendering is using a BasicStroke and defaulting
to CAP_SQUARE. Although in the cases where it needs to explicitly specify
parameters it chooses the correct CAP_BUTT.

So part of this is to fix the uses of BasicStroke by strike through and
underline to always use CAP_BUTT.

Test case is attached.

                                    

Comments
EVALUATION

As per description
                                     
2008-09-23



Hardware and Software, Engineered to Work Together