United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4314043 : Need a way to quickly determine if a Font object has a transform

Details
Type:
Enhancement
Submit Date:
2000-02-18
Status:
Resolved
Updated Date:
2000-03-21
Project Name:
JDK
Resolved Date:
2000-03-21
Component:
client-libs
OS:
generic
Sub-Component:
2d
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.2.0
Fixed Versions:
1.4.0 (beta)

Related Reports

Sub Tasks

Description
The Font object has a transform attribute that can be accessed via
Font.getTransform().  Most of the time, this attribute will be a
simple identity transform.  The only way to figure out if the
transform is an identity transform is to call getTransform and then
inspect the returned AffineTransform object.  Unfortunately, calling
getTransform() requires the Font object to clone the AffineTransform
since the transform is mutable.

Alternatively, Font could have a method that would return a boolean
indicating whether the transform attribute was an identity transform.
In that case, the caller could simplify their processing of the Font
and avoid having to clone a transform by avoiding a call to getTransform().

Similarly, the TransformAttribute object that is used to hold the
transform attribute for a Font object has no easy way to determine if
it is holding an identity transform.  An isIdentity() method on that
class would enable the same optimizations when dealing with a
TransformAttribute object.

                                    

Comments
EVALUATION

Implement new methods as indicated in Suggested Fix for Merlin.

jim.graham@Eng 2000-02-18
                                     
2000-02-18
SUGGESTED FIX

Add the following methods to the indicated classes:

	// true iff Font.getTransform().isIdentity() == false
	// Note: the return value is unaffected by the Size attribute
	java.awt.Font.isTransformed()

	// true iff TransformAttribute.getTransform().isIdentity() == true
	java.awt.font.TransformAttribute.isIdentity()
                                     
2004-06-11
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
merlin-beta

FIXED IN:
merlin-beta

INTEGRATED IN:
merlin-beta


                                     
2004-06-14



Hardware and Software, Engineered to Work Together