|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.font.GlyphVector
Instances of GlyphVector are created by a Font.
In a text processing application which can cache intermediate representations of text, creation and subsequent caching of a GlyphVector for use during rendering is the fastest method to present the visual representation of characters to a user.
A GlyphVector is associated with exactly one Font, and can provide data useful only in relation to the Font specified for the GlyphVector. In addition, metrics obtained from a GlyphVector are not generally geometrically scaleable since the pixelization and spacing are dependent on grid-fitting algorithms within a Font. To facilitate accurate measurement of a GlyphVector and its component Glyphs, you must specify a scaling transform, anti-alias mode, and fractional metrics mode at the time the GlyphVector is created. (These characteristics can be derived from the destination device.)
For each Glyph in the GlyphVector, you may obtain: 1) the position of the Glyph 2) the transform associated with the Glyph 3) the metrics of the Glyph in the context of the GlyphVector (the metrics of the Glyph may be different under different transforms, application specified rendering hints, and the specific instance of the Glyph within the GlyphVector)
GlyphVectors are immutable. There are no means provided to alter the state of the GlyphVector. Altering the data used to create the GlyphVector will not alter the state of the GlyphVector.
Methods are provided to create new GlyphVectors which are the result of editing editing operations on the GlyphVector such as Glyph insertion and deletion. These methods are most appropriate to applications which are forming combinations such as ligatures from existing Glyphs or are breaking such combinations into their component parts for visual presentation.
Methods are provided to create new GlyphVectors which are the result of specifying new positions for the Glyphs within the GlyphVector. These methods are most appropriate to applications which are performing justification operations for the presentation of the Glyphs.
Methods are provided to return both the visual and logical bounds of the entire GlyphVector or of individual Glyphs within the GlyphVector.
Methods are provided to return a Shape for the GlyphVector, and for individual Glyphs within the GlyphVector.
Font
,
GlyphMetrics
,
TextLayout
Constructor Summary | |
GlyphVector()
|
Method Summary | |
abstract boolean | equals(GlyphVector set)
Test for complete equality. |
abstract Font | getFont()
Return the Font associated with this GlyphVector. |
abstract FontRenderContext | getFontRenderContext()
Return the FontRenderContext associated with this GlyphVector. |
abstract int | getGlyphCode(int glyphIndex)
Return the glyphcode of the specified Glyph. |
abstract int[] | getGlyphCodes(int beginGlyphIndex,
int numEntries,
int[] codeReturn)
Return and array of glyphcodes for the the specified Glyphs. |
abstract GlyphJustificationInfo | getGlyphJustificationInfo(int glyphIndex)
|
abstract Shape | getGlyphLogicalBounds(int glyphIndex)
Return the logical bounds of the specified Glyph within the GlyphVector. |
abstract GlyphMetrics | getGlyphMetrics(int glyphIndex)
|
abstract Shape | getGlyphOutline(int glyphIndex)
Return a Shape whose interior corresponds to the visual representation of the specified glyph within the GlyphVector. |
abstract Point2D | getGlyphPosition(int glyphIndex)
Return the position of the specified glyph within the GlyphVector. |
abstract float[] | getGlyphPositions(int beginGlyphIndex,
int numEntries,
float[] positionReturn)
Return and array of glyph positions for the the specified Glyphs. |
abstract AffineTransform | getGlyphTransform(int glyphIndex)
Get the transform of the specified glyph within the GlyphVector. |
abstract Shape | getGlyphVisualBounds(int glyphIndex)
Return the visual bounds of the specified Glyph within the GlyphVector. |
abstract Rectangle2D | getLogicalBounds()
Return the logical bounds of this GlyphVector. |
abstract int | getNumGlyphs()
Return the number of Glyphs in this GlyphVector, you should Use this information to create arrays which are to be filled with results of other information retreival operations. |
abstract Shape | getOutline()
Return a Shape whose interior corresponds to the visual representation of the GlyphVector. |
abstract Shape | getOutline(float x,
float y)
Return a Shape whose interior corresponds to the visual representation of the GlyphVector. |
abstract Rectangle2D | getVisualBounds()
Return the visual bounds of this GlyphVector The visual bounds is tightest Rectangle enclosing all non-background pixels in the rendered representation of the GlyphVector. |
abstract void | performDefaultLayout()
Assigns default positions to each glyph in the GlyphVector. |
abstract void | setGlyphPosition(int glyphIndex,
Point2D newPos)
Set the position of the specified glyph within the GlyphVector. |
abstract void | setGlyphTransform(int glyphIndex,
AffineTransform newTX)
Set the transform of the specified glyph within the GlyphVector. |
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Constructor Detail |
public GlyphVector()
Method Detail |
public abstract Font getFont()
Font
public abstract FontRenderContext getFontRenderContext()
FontRenderContext
,
Font
public abstract void performDefaultLayout()
public abstract int getNumGlyphs()
public abstract int getGlyphCode(int glyphIndex)
Font#getLigature
public abstract int[] getGlyphCodes(int beginGlyphIndex, int numEntries, int[] codeReturn)
Font#getLigature
public abstract Rectangle2D getLogicalBounds()
public abstract Rectangle2D getVisualBounds()
public abstract Shape getOutline()
public abstract Shape getOutline(float x, float y)
public abstract Shape getGlyphOutline(int glyphIndex)
public abstract Point2D getGlyphPosition(int glyphIndex)
public abstract void setGlyphPosition(int glyphIndex, Point2D newPos)
public abstract AffineTransform getGlyphTransform(int glyphIndex)
public abstract void setGlyphTransform(int glyphIndex, AffineTransform newTX)
public abstract float[] getGlyphPositions(int beginGlyphIndex, int numEntries, float[] positionReturn)
public abstract Shape getGlyphLogicalBounds(int glyphIndex)
getGlyphVisualBounds(int)
public abstract Shape getGlyphVisualBounds(int glyphIndex)
getGlyphLogicalBounds(int)
public abstract GlyphMetrics getGlyphMetrics(int glyphIndex)
public abstract GlyphJustificationInfo getGlyphJustificationInfo(int glyphIndex)
public abstract boolean equals(GlyphVector set)
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |