Java Platform 1.2
Beta 4

Class java.awt.font.FontRenderContext

java.lang.Object
  |
  +--java.awt.font.FontRenderContext

public class FontRenderContext
extends Object
FontRenderContext is a container for the information which is needed to correctly measure text. The measurement of text may vary due to rules which map outlines to pixels, and due to rendering hints provided by an application.

One such piece of information is a transform which scales typographical points to pixels. (A point in Java is defined to be exactly 1/72 of an inch, which is slightly different than the traditional mechanical measurement of a point.) A character which is rendered at 12pt on a 600dpi device may have a different size than the same character rendered at 12pt on a 72dpi device due to such factors as rounding to pixel boundaries and hints that the font designer may have specified.

Anti-aliasing and Fractional-metrics specified by an application can also affect the size of a character due to rounding to pixel boundaries.

See Also:
java.awt.Graphics2D#TEXT_ANTIALIASING, java.awt.Graphics2D#FRACTIONALMETRICS, Graphics2D.getFontRenderContext(), java.awt.Font#LineMetrics, java.awt.Font#retrieveLineMetrics

Constructor Summary
FontRenderContext()
           
FontRenderContext(AffineTransform tx, boolean isAntiAliased, boolean usesFractionalMetrics)
           
 
Method Summary
 AffineTransform getTransform()
          Get the transform which is used to scale typographical points to pixels in this rendering context.
 boolean isAntiAliased()
          Get the text antialiasing mode used in this rendering context
 boolean usesFractionalMetrics()
          Get the text fractional metrics mode requested by the application for use in this rendering context
 
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
 

Constructor Detail

FontRenderContext

protected FontRenderContext()

FontRenderContext

public FontRenderContext(AffineTransform tx,
                         boolean isAntiAliased,
                         boolean usesFractionalMetrics)
Method Detail

getTransform

public AffineTransform getTransform()
Get the transform which is used to scale typographical points to pixels in this rendering context.
See Also:
AffineTransform

isAntiAliased

public boolean isAntiAliased()
Get the text antialiasing mode used in this rendering context
See Also:
java.awt.Graphics2D#TEXT_ANTIALIASING

usesFractionalMetrics

public boolean usesFractionalMetrics()
Get the text fractional metrics mode requested by the application for use in this rendering context
See Also:
java.awt.Graphics2D#FRACTIONALMETRICS

Java Platform 1.2
Beta 4

Submit a bug or feature
Submit comments/suggestions about new javadoc look
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.
This documentation was generated with a post-Beta4 version of Javadoc.