org.apache.batik.gvt.font

Class MultiGlyphVector

public class MultiGlyphVector extends Object implements GVTGlyphVector

Constructor Summary
MultiGlyphVector(List gvs)
Method Summary
voiddraw(Graphics2D g2d, AttributedCharacterIterator aci)
Draws the glyph vector.
Rectangle2DgetBounds2D(AttributedCharacterIterator aci)
Returns the bounds of this GlyphVector.
intgetCharacterCount(int startGlyphIndex, int endGlyphIndex)
Returns the number of chars represented by the glyphs within the specified range.
GVTFontgetFont()
Returns the Font associated with this GlyphVector.
FontRenderContextgetFontRenderContext()
Returns the FontRenderContext associated with this GlyphVector.
Rectangle2DgetGeometricBounds()
Returns the geometric bounds of this GlyphVector.
Rectangle2DgetGlyphCellBounds(int glyphIndex)
Returns the bounding box of the specified glyph, considering only the glyph's metrics (ascent, descent, advance) rather than the actual glyph shape.
intgetGlyphCode(int glyphIndex)
Returns the glyphcode of the specified glyph.
int[]getGlyphCodes(int beginGlyphIndex, int numEntries, int[] codeReturn)
Returns an array of glyphcodes for the specified glyphs.
GlyphJustificationInfogetGlyphJustificationInfo(int glyphIndex)
Returns the justification information for the glyph at the specified index into this GlyphVector.
ShapegetGlyphLogicalBounds(int glyphIndex)
Returns the logical bounds of the specified glyph within this GlyphVector.
GVTGlyphMetricsgetGlyphMetrics(int glyphIndex)
Returns the metrics of the glyph at the specified index into this GlyphVector.
ShapegetGlyphOutline(int glyphIndex)
Returns a Shape whose interior corresponds to the visual representation of the specified glyph within this GlyphVector.
Point2DgetGlyphPosition(int glyphIndex)
Returns the position of the specified glyph within this GlyphVector.
float[]getGlyphPositions(int beginGlyphIndex, int numEntries, float[] positionReturn)
Returns an array of glyph positions for the specified glyphs
AffineTransformgetGlyphTransform(int glyphIndex)
Gets the transform of the specified glyph within this GlyphVector.
ShapegetGlyphVisualBounds(int glyphIndex)
Returns the visual bounds of the specified glyph within the GlyphVector.
Rectangle2DgetLogicalBounds()
Returns the logical bounds of this GlyphVector.
intgetNumGlyphs()
Returns the number of glyphs in this GlyphVector.
ShapegetOutline()
Returns a Shape whose interior corresponds to the visual representation of this GlyphVector.
ShapegetOutline(float x, float y)
Returns a Shape whose interior corresponds to the visual representation of this GlyphVector, offset to x, y.
booleanisGlyphVisible(int glyphIndex)
Returns true if specified glyph will be drawn.
voidperformDefaultLayout()
voidsetGlyphPosition(int glyphIndex, Point2D newPos)
Sets the position of the specified glyph within this GlyphVector.
voidsetGlyphTransform(int glyphIndex, AffineTransform newTX)
Sets the transform of the specified glyph within this GlyphVector.
voidsetGlyphVisible(int glyphIndex, boolean visible)
Tells the glyph vector whether or not to draw the specified glyph.

Constructor Detail

MultiGlyphVector

public MultiGlyphVector(List gvs)

Method Detail

draw

public void draw(Graphics2D g2d, AttributedCharacterIterator aci)
Draws the glyph vector.

getBounds2D

public Rectangle2D getBounds2D(AttributedCharacterIterator aci)
Returns the bounds of this GlyphVector. This includes stroking effects.

getCharacterCount

public int getCharacterCount(int startGlyphIndex, int endGlyphIndex)
Returns the number of chars represented by the glyphs within the specified range.

Parameters: startGlyphIndex The index of the first glyph in the range. endGlyphIndex The index of the last glyph in the range.

Returns: The number of chars.

getFont

public GVTFont getFont()
Returns the Font associated with this GlyphVector.

getFontRenderContext

public FontRenderContext getFontRenderContext()
Returns the FontRenderContext associated with this GlyphVector.

getGeometricBounds

public Rectangle2D getGeometricBounds()
Returns the geometric bounds of this GlyphVector. The geometric bounds is the bounds of the geometry of the glyph vector, disregarding stroking.

getGlyphCellBounds

public Rectangle2D getGlyphCellBounds(int glyphIndex)
Returns the bounding box of the specified glyph, considering only the glyph's metrics (ascent, descent, advance) rather than the actual glyph shape.

getGlyphCode

public int getGlyphCode(int glyphIndex)
Returns the glyphcode of the specified glyph.

getGlyphCodes

public int[] getGlyphCodes(int beginGlyphIndex, int numEntries, int[] codeReturn)
Returns an array of glyphcodes for the specified glyphs.

getGlyphJustificationInfo

public GlyphJustificationInfo getGlyphJustificationInfo(int glyphIndex)
Returns the justification information for the glyph at the specified index into this GlyphVector.

getGlyphLogicalBounds

public Shape getGlyphLogicalBounds(int glyphIndex)
Returns the logical bounds of the specified glyph within this GlyphVector.

getGlyphMetrics

public GVTGlyphMetrics getGlyphMetrics(int glyphIndex)
Returns the metrics of the glyph at the specified index into this GlyphVector.

getGlyphOutline

public Shape getGlyphOutline(int glyphIndex)
Returns a Shape whose interior corresponds to the visual representation of the specified glyph within this GlyphVector.

getGlyphPosition

public Point2D getGlyphPosition(int glyphIndex)
Returns the position of the specified glyph within this GlyphVector.

getGlyphPositions

public float[] getGlyphPositions(int beginGlyphIndex, int numEntries, float[] positionReturn)
Returns an array of glyph positions for the specified glyphs

getGlyphTransform

public AffineTransform getGlyphTransform(int glyphIndex)
Gets the transform of the specified glyph within this GlyphVector.

getGlyphVisualBounds

public Shape getGlyphVisualBounds(int glyphIndex)
Returns the visual bounds of the specified glyph within the GlyphVector.

getLogicalBounds

public Rectangle2D getLogicalBounds()
Returns the logical bounds of this GlyphVector.

getNumGlyphs

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

getOutline

public Shape getOutline()
Returns a Shape whose interior corresponds to the visual representation of this GlyphVector.

getOutline

public Shape getOutline(float x, float y)
Returns a Shape whose interior corresponds to the visual representation of this GlyphVector, offset to x, y.

isGlyphVisible

public boolean isGlyphVisible(int glyphIndex)
Returns true if specified glyph will be drawn.

performDefaultLayout

public void performDefaultLayout()

setGlyphPosition

public void setGlyphPosition(int glyphIndex, Point2D newPos)
Sets the position of the specified glyph within this GlyphVector.

setGlyphTransform

public void setGlyphTransform(int glyphIndex, AffineTransform newTX)
Sets the transform of the specified glyph within this GlyphVector.

setGlyphVisible

public void setGlyphVisible(int glyphIndex, boolean visible)
Tells the glyph vector whether or not to draw the specified glyph.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.