java.awt.font
Class GlyphVector

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.font.GlyphVector
All Implemented Interfaces:
Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable

public abstract class GlyphVector
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable

A GlyphVector object is a collection of glyphs containing geometric information for the placement of each glyph in a transformed coordinate space which corresponds to the device on which the GlyphVector is ultimately displayed.

The GlyphVector does not attempt any interpretation of the sequence of glyphs it contains. Relationships between adjacent glyphs in sequence are solely used to determine the placement of the glyphs in the visual coordinate space.

Instances of GlyphVector are created by a Font sample code for java.awt.Font definition code for java.awt.Font .

In a text processing application that 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 this Font. 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 when creating the GlyphVector. These characteristics can be derived from the destination device.

For each glyph in the GlyphVector, you can obtain:

Altering the data used to create the GlyphVector does not alter the state of the GlyphVector.

Methods are provided to adjust the positions of the glyphs within the GlyphVector. These methods are most appropriate for applications that are performing justification operations for the presentation of the glyphs.

Methods are provided to transform individual glyphs within the GlyphVector. These methods are primarily useful for special effects.

Methods are provided to return both the visual, logical, and pixel bounds of the entire GlyphVector or of individual glyphs within the GlyphVector.

Methods are provided to return a Shape sample code for java.awt.Shape definition code for java.awt.Shape for the GlyphVector, and for individual glyphs within the GlyphVector.

See Also:
Font sample code for java.awt.Font definition code for java.awt.Font , GlyphMetrics sample code for java.awt.font.GlyphMetrics definition code for java.awt.font.GlyphMetrics , TextLayout sample code for java.awt.font.TextLayout definition code for java.awt.font.TextLayout

Field Summary
static int FLAG_COMPLEX_GLYPHS sample code for java.awt.font.GlyphVector.FLAG_COMPLEX_GLYPHS definition code for java.awt.font.GlyphVector.FLAG_COMPLEX_GLYPHS
          A flag used with getLayoutFlags that indicates that this GlyphVector has a complex glyph-to-char mapping (one that does not map glyphs to chars one-to-one in strictly ascending or descending order matching the run direction).
static int FLAG_HAS_POSITION_ADJUSTMENTS sample code for java.awt.font.GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS definition code for java.awt.font.GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS
          A flag used with getLayoutFlags that indicates that this GlyphVector has position adjustments.
static int FLAG_HAS_TRANSFORMS sample code for java.awt.font.GlyphVector.FLAG_HAS_TRANSFORMS definition code for java.awt.font.GlyphVector.FLAG_HAS_TRANSFORMS
          A flag used with getLayoutFlags that indicates that this GlyphVector has per-glyph transforms.
static int FLAG_MASK sample code for java.awt.font.GlyphVector.FLAG_MASK definition code for java.awt.font.GlyphVector.FLAG_MASK
          A mask for supported flags from getLayoutFlags.
static int FLAG_RUN_RTL sample code for java.awt.font.GlyphVector.FLAG_RUN_RTL definition code for java.awt.font.GlyphVector.FLAG_RUN_RTL
          A flag used with getLayoutFlags that indicates that this GlyphVector has a right-to-left run direction.
 
Constructor Summary
GlyphVector sample code for java.awt.font.GlyphVector.GlyphVector() definition code for java.awt.font.GlyphVector.GlyphVector() ()
           
 
Method Summary
abstract  boolean equals sample code for java.awt.font.GlyphVector.equals(java.awt.font.GlyphVector) definition code for java.awt.font.GlyphVector.equals(java.awt.font.GlyphVector) (GlyphVector sample code for java.awt.font.GlyphVector definition code for java.awt.font.GlyphVector  set)
          Tests if the specified GlyphVector exactly equals this GlyphVector.
abstract  Font sample code for java.awt.Font definition code for java.awt.Font getFont sample code for java.awt.font.GlyphVector.getFont() definition code for java.awt.font.GlyphVector.getFont() ()
          Returns the Font associated with this GlyphVector.
abstract  FontRenderContext sample code for java.awt.font.FontRenderContext definition code for java.awt.font.FontRenderContext getFontRenderContext sample code for java.awt.font.GlyphVector.getFontRenderContext() definition code for java.awt.font.GlyphVector.getFontRenderContext() ()
          Returns the FontRenderContext sample code for java.awt.font.FontRenderContext definition code for java.awt.font.FontRenderContext associated with this GlyphVector.
 int getGlyphCharIndex sample code for java.awt.font.GlyphVector.getGlyphCharIndex(int) definition code for java.awt.font.GlyphVector.getGlyphCharIndex(int) (int glyphIndex)
          Returns the character index of the specified glyph.
 int[] getGlyphCharIndices sample code for java.awt.font.GlyphVector.getGlyphCharIndices(int, int, int[]) definition code for java.awt.font.GlyphVector.getGlyphCharIndices(int, int, int[]) (int beginGlyphIndex, int numEntries, int[] codeReturn)
          Returns the character indices of the specified glyphs.
abstract  int getGlyphCode sample code for java.awt.font.GlyphVector.getGlyphCode(int) definition code for java.awt.font.GlyphVector.getGlyphCode(int) (int glyphIndex)
          Returns the glyphcode of the specified glyph.
abstract  int[] getGlyphCodes sample code for java.awt.font.GlyphVector.getGlyphCodes(int, int, int[]) definition code for java.awt.font.GlyphVector.getGlyphCodes(int, int, int[]) (int beginGlyphIndex, int numEntries, int[] codeReturn)
          Returns an array of glyphcodes for the specified glyphs.
abstract  GlyphJustificationInfo sample code for java.awt.font.GlyphJustificationInfo definition code for java.awt.font.GlyphJustificationInfo getGlyphJustificationInfo sample code for java.awt.font.GlyphVector.getGlyphJustificationInfo(int) definition code for java.awt.font.GlyphVector.getGlyphJustificationInfo(int) (int glyphIndex)
          Returns the justification information for the glyph at the specified index into this GlyphVector.
abstract  Shape sample code for java.awt.Shape definition code for java.awt.Shape getGlyphLogicalBounds sample code for java.awt.font.GlyphVector.getGlyphLogicalBounds(int) definition code for java.awt.font.GlyphVector.getGlyphLogicalBounds(int) (int glyphIndex)
          Returns the logical bounds of the specified glyph within this GlyphVector.
abstract  GlyphMetrics sample code for java.awt.font.GlyphMetrics definition code for java.awt.font.GlyphMetrics getGlyphMetrics sample code for java.awt.font.GlyphVector.getGlyphMetrics(int) definition code for java.awt.font.GlyphVector.getGlyphMetrics(int) (int glyphIndex)
          Returns the metrics of the glyph at the specified index into this GlyphVector.
abstract  Shape sample code for java.awt.Shape definition code for java.awt.Shape getGlyphOutline sample code for java.awt.font.GlyphVector.getGlyphOutline(int) definition code for java.awt.font.GlyphVector.getGlyphOutline(int) (int glyphIndex)
          Returns a Shape whose interior corresponds to the visual representation of the specified glyph within this GlyphVector.
 Shape sample code for java.awt.Shape definition code for java.awt.Shape getGlyphOutline sample code for java.awt.font.GlyphVector.getGlyphOutline(int, float, float) definition code for java.awt.font.GlyphVector.getGlyphOutline(int, float, float) (int glyphIndex, float x, float y)
          Returns a Shape whose interior corresponds to the visual representation of the specified glyph within this GlyphVector, offset to x, y.
 Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle getGlyphPixelBounds sample code for java.awt.font.GlyphVector.getGlyphPixelBounds(int, java.awt.font.FontRenderContext, float, float) definition code for java.awt.font.GlyphVector.getGlyphPixelBounds(int, java.awt.font.FontRenderContext, float, float) (int index, FontRenderContext sample code for java.awt.font.FontRenderContext definition code for java.awt.font.FontRenderContext  renderFRC, float x, float y)
          Returns the pixel bounds of the glyph at index when this GlyphVector is rendered in a Graphics with the given FontRenderContext at the given location.
abstract  Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D getGlyphPosition sample code for java.awt.font.GlyphVector.getGlyphPosition(int) definition code for java.awt.font.GlyphVector.getGlyphPosition(int) (int glyphIndex)
          Returns the position of the specified glyph relative to the origin of this GlyphVector.
abstract  float[] getGlyphPositions sample code for java.awt.font.GlyphVector.getGlyphPositions(int, int, float[]) definition code for java.awt.font.GlyphVector.getGlyphPositions(int, int, float[]) (int beginGlyphIndex, int numEntries, float[] positionReturn)
          Returns an array of glyph positions for the specified glyphs.
abstract  AffineTransform sample code for java.awt.geom.AffineTransform definition code for java.awt.geom.AffineTransform getGlyphTransform sample code for java.awt.font.GlyphVector.getGlyphTransform(int) definition code for java.awt.font.GlyphVector.getGlyphTransform(int) (int glyphIndex)
          Returns the transform of the specified glyph within this GlyphVector.
abstract  Shape sample code for java.awt.Shape definition code for java.awt.Shape getGlyphVisualBounds sample code for java.awt.font.GlyphVector.getGlyphVisualBounds(int) definition code for java.awt.font.GlyphVector.getGlyphVisualBounds(int) (int glyphIndex)
          Returns the visual bounds of the specified glyph within the GlyphVector.
 int getLayoutFlags sample code for java.awt.font.GlyphVector.getLayoutFlags() definition code for java.awt.font.GlyphVector.getLayoutFlags() ()
          Returns flags describing the global state of the GlyphVector.
abstract  Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D getLogicalBounds sample code for java.awt.font.GlyphVector.getLogicalBounds() definition code for java.awt.font.GlyphVector.getLogicalBounds() ()
          Returns the logical bounds of this GlyphVector.
abstract  int getNumGlyphs sample code for java.awt.font.GlyphVector.getNumGlyphs() definition code for java.awt.font.GlyphVector.getNumGlyphs() ()
          Returns the number of glyphs in this GlyphVector.
abstract  Shape sample code for java.awt.Shape definition code for java.awt.Shape getOutline sample code for java.awt.font.GlyphVector.getOutline() definition code for java.awt.font.GlyphVector.getOutline() ()
          Returns a Shape whose interior corresponds to the visual representation of this GlyphVector.
abstract  Shape sample code for java.awt.Shape definition code for java.awt.Shape getOutline sample code for java.awt.font.GlyphVector.getOutline(float, float) definition code for java.awt.font.GlyphVector.getOutline(float, float) (float x, float y)
          Returns a Shape whose interior corresponds to the visual representation of this GlyphVector when rendered at x, y.
 Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle getPixelBounds sample code for java.awt.font.GlyphVector.getPixelBounds(java.awt.font.FontRenderContext, float, float) definition code for java.awt.font.GlyphVector.getPixelBounds(java.awt.font.FontRenderContext, float, float) (FontRenderContext sample code for java.awt.font.FontRenderContext definition code for java.awt.font.FontRenderContext  renderFRC, float x, float y)
          Returns the pixel bounds of this GlyphVector when rendered in a graphics with the given FontRenderContext at the given location.
abstract  Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D getVisualBounds sample code for java.awt.font.GlyphVector.getVisualBounds() definition code for java.awt.font.GlyphVector.getVisualBounds() ()
          Returns the visual bounds of this GlyphVector The visual bounds is the bounding box of the outline of this GlyphVector.
abstract  void performDefaultLayout sample code for java.awt.font.GlyphVector.performDefaultLayout() definition code for java.awt.font.GlyphVector.performDefaultLayout() ()
          Assigns default positions to each glyph in this GlyphVector.
abstract  void setGlyphPosition sample code for java.awt.font.GlyphVector.setGlyphPosition(int, java.awt.geom.Point2D) definition code for java.awt.font.GlyphVector.setGlyphPosition(int, java.awt.geom.Point2D) (int glyphIndex, Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D  newPos)
          Sets the position of the specified glyph within this GlyphVector.
abstract  void setGlyphTransform sample code for java.awt.font.GlyphVector.setGlyphTransform(int, java.awt.geom.AffineTransform) definition code for java.awt.font.GlyphVector.setGlyphTransform(int, java.awt.geom.AffineTransform) (int glyphIndex, AffineTransform sample code for java.awt.geom.AffineTransform definition code for java.awt.geom.AffineTransform  newTX)
          Sets the transform of the specified glyph within this GlyphVector.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

FLAG_HAS_TRANSFORMS sample code for java.awt.font.GlyphVector.FLAG_HAS_TRANSFORMS

public static final int FLAG_HAS_TRANSFORMS
A flag used with getLayoutFlags that indicates that this GlyphVector has per-glyph transforms.

Since:
1.4
See Also:
Constant Field Values

FLAG_HAS_POSITION_ADJUSTMENTS sample code for java.awt.font.GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS

public static final int FLAG_HAS_POSITION_ADJUSTMENTS
A flag used with getLayoutFlags that indicates that this GlyphVector has position adjustments. When this is true, the glyph positions don't match the accumulated default advances of the glyphs (for example, if kerning has been done).

Since:
1.4
See Also:
Constant Field Values

FLAG_RUN_RTL sample code for java.awt.font.GlyphVector.FLAG_RUN_RTL

public static final int FLAG_RUN_RTL
A flag used with getLayoutFlags that indicates that this GlyphVector has a right-to-left run direction. This refers to the glyph-to-char mapping and does not imply that the visual locations of the glyphs are necessarily in this order, although generally they will be.

Since:
1.4
See Also:
Constant Field Values

FLAG_COMPLEX_GLYPHS sample code for java.awt.font.GlyphVector.FLAG_COMPLEX_GLYPHS

public static final int FLAG_COMPLEX_GLYPHS
A flag used with getLayoutFlags that indicates that this GlyphVector has a complex glyph-to-char mapping (one that does not map glyphs to chars one-to-one in strictly ascending or descending order matching the run direction).

Since:
1.4
See Also:
Constant Field Values

FLAG_MASK sample code for java.awt.font.GlyphVector.FLAG_MASK

public static final int FLAG_MASK
A mask for supported flags from getLayoutFlags. Only bits covered by the mask should be tested.

Since:
1.4
See Also:
Constant Field Values
Constructor Detail

GlyphVector sample code for java.awt.font.GlyphVector() definition code for java.awt.font.GlyphVector()

public GlyphVector()
Method Detail

getFont sample code for java.awt.font.GlyphVector.getFont() definition code for java.awt.font.GlyphVector.getFont()

public abstract Font sample code for java.awt.Font definition code for java.awt.Font  getFont()
Returns the Font associated with this GlyphVector.

Returns:
Font used to create this GlyphVector.
See Also:
Font sample code for java.awt.Font definition code for java.awt.Font

getFontRenderContext sample code for java.awt.font.GlyphVector.getFontRenderContext() definition code for java.awt.font.GlyphVector.getFontRenderContext()

public abstract FontRenderContext sample code for java.awt.font.FontRenderContext definition code for java.awt.font.FontRenderContext  getFontRenderContext()
Returns the FontRenderContext sample code for java.awt.font.FontRenderContext definition code for java.awt.font.FontRenderContext associated with this GlyphVector.

Returns:
FontRenderContext used to create this GlyphVector.
See Also:
FontRenderContext sample code for java.awt.font.FontRenderContext definition code for java.awt.font.FontRenderContext , Font sample code for java.awt.Font definition code for java.awt.Font

performDefaultLayout sample code for java.awt.font.GlyphVector.performDefaultLayout() definition code for java.awt.font.GlyphVector.performDefaultLayout()

public abstract void performDefaultLayout()
Assigns default positions to each glyph in this GlyphVector. This can destroy information generated during initial layout of this GlyphVector.


getNumGlyphs sample code for java.awt.font.GlyphVector.getNumGlyphs() definition code for java.awt.font.GlyphVector.getNumGlyphs()

public abstract int getNumGlyphs()
Returns the number of glyphs in this GlyphVector.

Returns:
number of glyphs in this GlyphVector.

getGlyphCode sample code for java.awt.font.GlyphVector.getGlyphCode(int) definition code for java.awt.font.GlyphVector.getGlyphCode(int)

public abstract int getGlyphCode(int glyphIndex)
Returns the glyphcode of the specified glyph. This return value is meaningless to anything other than the Font object that created this GlyphVector.

Parameters:
glyphIndex - the index into this GlyphVector that corresponds to the glyph from which to retrieve the glyphcode.
Returns:
the glyphcode of the glyph at the specified glyphIndex.
Throws:
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than or equal to the number of glyphs in this GlyphVector

getGlyphCodes sample code for java.awt.font.GlyphVector.getGlyphCodes(int, int, int[]) definition code for java.awt.font.GlyphVector.getGlyphCodes(int, int, int[])

public abstract int[] getGlyphCodes(int beginGlyphIndex,
                                    int numEntries,
                                    int[] codeReturn)
Returns an array of glyphcodes for the specified glyphs. The contents of this return value are meaningless to anything other than the Font used to create this GlyphVector. This method is used for convenience and performance when processing glyphcodes. If no array is passed in, a new array is created.

Parameters:
beginGlyphIndex - the index into this GlyphVector at which to start retrieving glyphcodes
numEntries - the number of glyphcodes to retrieve
codeReturn - the array that receives the glyphcodes and is then returned
Returns:
an array of glyphcodes for the specified glyphs.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if numEntries is less than 0
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if beginGlyphIndex is less than 0
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if the sum of beginGlyphIndex and numEntries is greater than the number of glyphs in this GlyphVector

getGlyphCharIndex sample code for java.awt.font.GlyphVector.getGlyphCharIndex(int) definition code for java.awt.font.GlyphVector.getGlyphCharIndex(int)

public int getGlyphCharIndex(int glyphIndex)
Returns the character index of the specified glyph. The character index is the index of the first logical character represented by the glyph. The default implementation assumes a one-to-one, left-to-right mapping of glyphs to characters.

Parameters:
glyphIndex - the index of the glyph
Returns:
the index of the first character represented by the glyph
Since:
1.4

getGlyphCharIndices sample code for java.awt.font.GlyphVector.getGlyphCharIndices(int, int, int[]) definition code for java.awt.font.GlyphVector.getGlyphCharIndices(int, int, int[])

public int[] getGlyphCharIndices(int beginGlyphIndex,
                                 int numEntries,
                                 int[] codeReturn)
Returns the character indices of the specified glyphs. The character index is the index of the first logical character represented by the glyph. Indices are returned in glyph order. The default implementation invokes getGlyphCharIndex for each glyph, and subclassers will probably want to override this implementation for performance reasons. Use this method for convenience and performance in processing of glyphcodes. If no array is passed in, a new array is created.

Parameters:
beginGlyphIndex - the index of the first glyph
numEntries - the number of glyph indices
codeReturn - the array into which to return the character indices
Returns:
an array of character indices, one per glyph.
Since:
1.4

getLogicalBounds sample code for java.awt.font.GlyphVector.getLogicalBounds() definition code for java.awt.font.GlyphVector.getLogicalBounds()

public abstract Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D  getLogicalBounds()
Returns the logical bounds of this GlyphVector. This method is used when positioning this GlyphVector in relation to visually adjacent GlyphVector objects.

Returns:
a Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D that is the logical bounds of this GlyphVector.

getVisualBounds sample code for java.awt.font.GlyphVector.getVisualBounds() definition code for java.awt.font.GlyphVector.getVisualBounds()

public abstract Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D  getVisualBounds()
Returns the visual bounds of this GlyphVector The visual bounds is the bounding box of the outline of this GlyphVector. Because of rasterization and alignment of pixels, it is possible that this box does not enclose all pixels affected by rendering this GlyphVector.

Returns:
a Rectangle2D that is the bounding box of this GlyphVector.

getPixelBounds sample code for java.awt.font.GlyphVector.getPixelBounds(java.awt.font.FontRenderContext, float, float) definition code for java.awt.font.GlyphVector.getPixelBounds(java.awt.font.FontRenderContext, float, float)

public Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  getPixelBounds(FontRenderContext sample code for java.awt.font.FontRenderContext definition code for java.awt.font.FontRenderContext  renderFRC,
                                float x,
                                float y)
Returns the pixel bounds of this GlyphVector when rendered in a graphics with the given FontRenderContext at the given location. The renderFRC need not be the same as the FontRenderContext of this GlyphVector, and can be null. If it is null, the FontRenderContext of this GlyphVector is used. The default implementation returns the visual bounds, offset to x, y and rounded out to the next integer value (i.e. returns an integer rectangle which encloses the visual bounds) and ignores the FRC. Subclassers should override this method.

Parameters:
renderFRC - the FontRenderContext of the Graphics.
x - the x-coordinate at which to render this GlyphVector.
y - the y-coordinate at which to render this GlyphVector.
Returns:
a Rectangle bounding the pixels that would be affected.
Since:
1.4

getOutline sample code for java.awt.font.GlyphVector.getOutline() definition code for java.awt.font.GlyphVector.getOutline()

public abstract Shape sample code for java.awt.Shape definition code for java.awt.Shape  getOutline()
Returns a Shape whose interior corresponds to the visual representation of this GlyphVector.

Returns:
a Shape that is the outline of this GlyphVector.

getOutline sample code for java.awt.font.GlyphVector.getOutline(float, float) definition code for java.awt.font.GlyphVector.getOutline(float, float)

public abstract Shape sample code for java.awt.Shape definition code for java.awt.Shape  getOutline(float x,
                                 float y)
Returns a Shape whose interior corresponds to the visual representation of this GlyphVector when rendered at x, y.

Parameters:
x, y - the coordinates of this GlyphVector.
Returns:
a Shape that is the outline of this GlyphVector when rendered at the specified coordinates.

getGlyphOutline sample code for java.awt.font.GlyphVector.getGlyphOutline(int) definition code for java.awt.font.GlyphVector.getGlyphOutline(int)

public abstract Shape sample code for java.awt.Shape definition code for java.awt.Shape  getGlyphOutline(int glyphIndex)
Returns a Shape whose interior corresponds to the visual representation of the specified glyph within this GlyphVector. The outline returned by this method is positioned around the origin of each individual glyph.

Parameters:
glyphIndex - the index into this GlyphVector
Returns:
a Shape that is the outline of the glyph at the specified glyphIndex of this GlyphVector.
Throws:
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than or equal to the number of glyphs in this GlyphVector

getGlyphOutline sample code for java.awt.font.GlyphVector.getGlyphOutline(int, float, float) definition code for java.awt.font.GlyphVector.getGlyphOutline(int, float, float)

public Shape sample code for java.awt.Shape definition code for java.awt.Shape  getGlyphOutline(int glyphIndex,
                             float x,
                             float y)
Returns a Shape whose interior corresponds to the visual representation of the specified glyph within this GlyphVector, offset to x, y. The outline returned by this method is positioned around the origin of each individual glyph.

Parameters:
glyphIndex - the index into this GlyphVector
x, y - the coordinates of the location of this GlyphVector.
Returns:
a Shape that is the outline of the glyph at the specified glyphIndex of this GlyphVector when rendered at the specified coordinates.
Throws:
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than or equal to the number of glyphs in this GlyphVector
Since:
1.4

getGlyphPosition sample code for java.awt.font.GlyphVector.getGlyphPosition(int) definition code for java.awt.font.GlyphVector.getGlyphPosition(int)

public abstract Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D  getGlyphPosition(int glyphIndex)
Returns the position of the specified glyph relative to the origin of this GlyphVector. If glyphIndex equals the number of of glyphs in this GlyphVector, this method returns the position after the last glyph. This position is used to define the advance of the entire GlyphVector.

Parameters:
glyphIndex - the index into this GlyphVector
Returns:
a Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D object that is the position of the glyph at the specified glyphIndex.
Throws:
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than the number of glyphs in this GlyphVector
See Also:
setGlyphPosition(int, java.awt.geom.Point2D) sample code for java.awt.font.GlyphVector.setGlyphPosition(int, java.awt.geom.Point2D) definition code for java.awt.font.GlyphVector.setGlyphPosition(int, java.awt.geom.Point2D)

setGlyphPosition sample code for java.awt.font.GlyphVector.setGlyphPosition(int, java.awt.geom.Point2D) definition code for java.awt.font.GlyphVector.setGlyphPosition(int, java.awt.geom.Point2D)

public abstract void setGlyphPosition(int glyphIndex,
                                      Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D  newPos)
Sets the position of the specified glyph within this GlyphVector. If glyphIndex equals the number of of glyphs in this GlyphVector, this method sets the position after the last glyph. This position is used to define the advance of the entire GlyphVector.

Parameters:
glyphIndex - the index into this GlyphVector
newPos - the Point2D at which to position the glyph at the specified glyphIndex
Throws:
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than the number of glyphs in this GlyphVector
See Also:
getGlyphPosition(int) sample code for java.awt.font.GlyphVector.getGlyphPosition(int) definition code for java.awt.font.GlyphVector.getGlyphPosition(int)

getGlyphTransform sample code for java.awt.font.GlyphVector.getGlyphTransform(int) definition code for java.awt.font.GlyphVector.getGlyphTransform(int)

public abstract AffineTransform sample code for java.awt.geom.AffineTransform definition code for java.awt.geom.AffineTransform  getGlyphTransform(int glyphIndex)
Returns the transform of the specified glyph within this GlyphVector. The transform is relative to the glyph position. If no special transform has been applied, null can be returned. A null return indicates an identity transform.

Parameters:
glyphIndex - the index into this GlyphVector
Returns:
an AffineTransform sample code for java.awt.geom.AffineTransform definition code for java.awt.geom.AffineTransform that is the transform of the glyph at the specified glyphIndex.
Throws:
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than or equal to the number of glyphs in this GlyphVector
See Also:
setGlyphTransform(int, java.awt.geom.AffineTransform) sample code for java.awt.font.GlyphVector.setGlyphTransform(int, java.awt.geom.AffineTransform) definition code for java.awt.font.GlyphVector.setGlyphTransform(int, java.awt.geom.AffineTransform)

setGlyphTransform sample code for java.awt.font.GlyphVector.setGlyphTransform(int, java.awt.geom.AffineTransform) definition code for java.awt.font.GlyphVector.setGlyphTransform(int, java.awt.geom.AffineTransform)

public abstract void setGlyphTransform(int glyphIndex,
                                       AffineTransform sample code for java.awt.geom.AffineTransform definition code for java.awt.geom.AffineTransform  newTX)
Sets the transform of the specified glyph within this GlyphVector. The transform is relative to the glyph position. A null argument for newTX indicates that no special transform is applied for the specified glyph. This method can be used to rotate, mirror, translate and scale the glyph. Adding a transform can result in signifant performance changes.

Parameters:
glyphIndex - the index into this GlyphVector
newTX - the new transform of the glyph at glyphIndex
Throws:
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if glyphIndex is less than 0 or greater than or equal to the number of glyphs in this GlyphVector
See Also:
getGlyphTransform(int) sample code for java.awt.font.GlyphVector.getGlyphTransform(int) definition code for java.awt.font.GlyphVector.getGlyphTransform(int)

getLayoutFlags sample code for java.awt.font.GlyphVector.getLayoutFlags() definition code for java.awt.font.GlyphVector.getLayoutFlags()

public int getLayoutFlags()
Returns flags describing the global state of the GlyphVector. Flags not described below are reserved. The default implementation returns 0 (meaning false) for the position adjustments, transforms, rtl, and complex flags. Subclassers should override this method, and make sure it correctly describes the GlyphVector and corresponds to the results of related calls.

Returns:
an int containing the flags describing the state
Since:
1.4
See Also:
FLAG_HAS_POSITION_ADJUSTMENTS sample code for java.awt.font.GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS definition code for java.awt.font.GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS , FLAG_HAS_TRANSFORMS sample code for java.awt.font.GlyphVector.FLAG_HAS_TRANSFORMS definition code for java.awt.font.GlyphVector.FLAG_HAS_TRANSFORMS , FLAG_RUN_RTL sample code for java.awt.font.GlyphVector.FLAG_RUN_RTL