|
Préférences
Moteurs de recherche
|
|||||||||||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.6.0
java.awt.font
|
Constructor Summary | |
---|---|
protected |
FontRenderContext()
Constructs a new FontRenderContext
object. |
|
FontRenderContext(AffineTransform tx,
boolean isAntiAliased,
boolean usesFractionalMetrics)
Constructs a FontRenderContext object from an
optional AffineTransform and two boolean
values that determine if the newly constructed object has
anti-aliasing or fractional metrics. |
|
FontRenderContext(AffineTransform tx,
Object aaHint,
Object fmHint)
Constructs a FontRenderContext object from an
optional AffineTransform and two Object
values that determine if the newly constructed object has
anti-aliasing or fractional metrics. |
Method Summary | |
---|---|
boolean |
equals(FontRenderContext rhs)
Return true if rhs has the same transform, antialiasing, and fractional metrics values as this. |
boolean |
equals(Object obj)
Return true if obj is an instance of FontRenderContext and has the same transform, antialiasing, and fractional metrics values as this. |
Object |
getAntiAliasingHint()
Return the text anti-aliasing rendering mode hint used in this FontRenderContext . |
Object |
getFractionalMetricsHint()
Return the text fractional metrics rendering mode hint used in this FontRenderContext . |
AffineTransform |
getTransform()
Gets the transform that is used to scale typographical points to pixels in this FontRenderContext . |
int |
getTransformType()
Returns the integer type of the affine transform for this FontRenderContext as specified by
AffineTransform.getType() |
int |
hashCode()
Return a hashcode for this FontRenderContext. |
boolean |
isAntiAliased()
Returns a boolean which indicates whether or not some form of antialiasing is specified by this FontRenderContext . |
boolean |
isTransformed()
Indicates whether or not this FontRenderContext object
measures text in a transformed render context. |
boolean |
usesFractionalMetrics()
Returns a boolean which whether text fractional metrics mode is used in this FontRenderContext . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected FontRenderContext()
FontRenderContext
object.
public FontRenderContext(AffineTransform tx, boolean isAntiAliased, boolean usesFractionalMetrics)
FontRenderContext
object from an
optional AffineTransform
and two boolean
values that determine if the newly constructed object has
anti-aliasing or fractional metrics.
In each case the boolean values true
and false
correspond to the rendering hint values ON
and
OFF
respectively.
To specify other hint values, use the constructor which
specifies the rendering hint values as parameters :
FontRenderContext(AffineTransform, Object, Object)
.
tx
- the transform which is used to scale typographical points
to pixels in this FontRenderContext
. If null, an
identity transform is used.isAntiAliased
- determines if the newly constructed object
has anti-aliasing.usesFractionalMetrics
- determines if the newly constructed
object has fractional metrics.public FontRenderContext(AffineTransform tx, Object aaHint, Object fmHint)
FontRenderContext
object from an
optional AffineTransform
and two Object
values that determine if the newly constructed object has
anti-aliasing or fractional metrics.
tx
- the transform which is used to scale typographical points
to pixels in this FontRenderContext
. If null, an
identity tranform is used.aaHint
- - one of the text antialiasing rendering hint values
defined in java.awt.RenderingHints
.
Any other value will throw IllegalArgumentException
.
VALUE_TEXT_ANTIALIAS_DEFAULT
may be specified, in which case the mode used is implementation
dependent.fmHint
- - one of the text fractional rendering hint values defined
in java.awt.RenderingHints
.
VALUE_FRACTIONALMETRICS_DEFAULT
may be specified, in which case the mode used is implementation
dependent.
Any other value will throw IllegalArgumentException
IllegalArgumentException
- if the hints are not one of the
legal values.Method Detail |
---|
public boolean isTransformed()
FontRenderContext
object
measures text in a transformed render context.
true
if this FontRenderContext
object has a non-identity AffineTransform attribute.
false
otherwise.getTransform()
public int getTransformType()
FontRenderContext
as specified by
AffineTransform.getType()
AffineTransform
public AffineTransform getTransform()
FontRenderContext
.
AffineTransform
of this
FontRenderContext
.AffineTransform
public boolean isAntiAliased()
FontRenderContext
.
Call getAntiAliasingHint()
for the specific rendering hint value.
true
, if text is anti-aliased in this
FontRenderContext
; false
otherwise.RenderingHints.KEY_TEXT_ANTIALIASING
,
FontRenderContext(AffineTransform,boolean,boolean)
,
FontRenderContext(AffineTransform,Object,Object)
public boolean usesFractionalMetrics()
FontRenderContext
.
Call getFractionalMetricsHint()
to obtain the corresponding rendering hint value.
true
, if layout should be performed with
fractional metrics; false
otherwise.
in this FontRenderContext
.RenderingHints.KEY_FRACTIONALMETRICS
,
FontRenderContext(AffineTransform,boolean,boolean)
,
FontRenderContext(AffineTransform,Object,Object)
public Object getAntiAliasingHint()
FontRenderContext
.
This will be one of the text antialiasing rendering hint values
defined in java.awt.RenderingHints
.
FontRenderContext
.public Object getFractionalMetricsHint()
FontRenderContext
.
This will be one of the text fractional metrics rendering hint values
defined in java.awt.RenderingHints
.
FontRenderContext
.public boolean equals(Object obj)
obj
- the object to test for equality
true
if the specified object is equal to
this FontRenderContext
; false
otherwise.Object.hashCode()
,
Hashtable
public boolean equals(FontRenderContext rhs)
rhs
- the FontRenderContext
to test for equality
true
if rhs
is equal to
this FontRenderContext
; false
otherwise.public int hashCode()
Object.equals(java.lang.Object)
,
Hashtable