Package org.apache.batik.gvt.font
Interface GVTGlyphVector
- All Known Implementing Classes:
AWTGVTGlyphVector
,MultiGlyphVector
,SVGGVTGlyphVector
public interface GVTGlyphVector
An interface for all GVT GlyphVector classes.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(Graphics2D graphics2D, AttributedCharacterIterator aci) Draws the glyph vector.Returns a tight bounds on the GylphVector including stroking.int
getCharacterCount
(int startGlyphIndex, int endGlyphIndex) Returns the number of chars represented by the glyphs within the specified range.getFont()
Returns the Font associated with this GlyphVector.Returns the FontRenderContext associated with this GlyphVector.Returns the visual bounds of this GlyphVector The visual bounds is the tightest rectangle enclosing all non-background pixels in the rendered representation of this GlyphVector.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.int
getGlyphCode
(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.getGlyphJustificationInfo
(int glyphIndex) Returns the justification information for the glyph at the specified index into this GlyphVector.getGlyphLogicalBounds
(int glyphIndex) Returns the logical bounds of the specified glyph within this GlyphVector.getGlyphMetrics
(int glyphIndex) Returns the metrics of the glyph at the specified index into this GlyphVector.getGlyphOutline
(int glyphIndex) Returns a Shape whose interior corresponds to the visual representation of the specified glyph within this GlyphVector.getGlyphPosition
(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 glyphsgetGlyphTransform
(int glyphIndex) Gets the transform of the specified glyph within this GlyphVector.getGlyphVisualBounds
(int glyphIndex) Returns the visual bounds of the specified glyph within the GlyphVector.Returns the logical bounds of this GlyphVector.int
Returns the number of glyphs in this GlyphVector.Returns a Shape whose interior corresponds to the visual representation of this GlyphVector.getOutline
(float x, float y) Returns a Shape whose interior corresponds to the visual representation of this GlyphVector, offset to x, y.boolean
isGlyphVisible
(int glyphIndex) Returns true if specified glyph will be drawn.boolean
Return true if glyphs have been reversed.void
maybeReverse
(boolean mirror) Reverse (and optionally mirror) glyphs if not already reversed.void
Assigns default positions to each glyph in this GlyphVector.void
setGlyphPosition
(int glyphIndex, Point2D newPos) Sets the position of the specified glyph within this GlyphVector.void
setGlyphTransform
(int glyphIndex, AffineTransform newTX) Sets the transform of the specified glyph within this GlyphVector.void
setGlyphVisible
(int glyphIndex, boolean visible) Tells the glyph vector whether or not to draw the specified glyph.
-
Method Details
-
getFont
GVTFont getFont()Returns the Font associated with this GlyphVector. -
getFontRenderContext
FontRenderContext getFontRenderContext()Returns the FontRenderContext associated with this GlyphVector. -
getGlyphCode
int getGlyphCode(int glyphIndex) Returns the glyphcode of the specified glyph. -
getGlyphCodes
int[] getGlyphCodes(int beginGlyphIndex, int numEntries, int[] codeReturn) Returns an array of glyphcodes for the specified glyphs. -
getGlyphJustificationInfo
Returns the justification information for the glyph at the specified index into this GlyphVector. -
getGlyphLogicalBounds
Returns the logical bounds of the specified glyph within this GlyphVector. This is a good bound for hit detection and highlighting it is not tight in any sense, and in some (rare) cases may exclude parts of the glyph. -
getGlyphMetrics
Returns the metrics of the glyph at the specified index into this GlyphVector. -
getGlyphOutline
Returns a Shape whose interior corresponds to the visual representation of the specified glyph within this GlyphVector. -
getGlyphCellBounds
Returns the bounding box of the specified glyph, considering only the glyph's metrics (ascent, descent, advance) rather than the actual glyph shape. -
getGlyphPosition
Returns the position of the specified glyph within this GlyphVector. -
getGlyphPositions
float[] getGlyphPositions(int beginGlyphIndex, int numEntries, float[] positionReturn) Returns an array of glyph positions for the specified glyphs -
getGlyphTransform
Gets the transform of the specified glyph within this GlyphVector. -
getGlyphVisualBounds
Returns the visual bounds of the specified glyph within the GlyphVector. -
getLogicalBounds
Rectangle2D getLogicalBounds()Returns the logical bounds of this GlyphVector. This is a good bound for hit detection and highlighting it is not tight in any sense, and in some (rare) cases may exclude parts of the glyph. -
getNumGlyphs
int getNumGlyphs()Returns the number of glyphs in this GlyphVector. -
getOutline
Shape getOutline()Returns a Shape whose interior corresponds to the visual representation of this GlyphVector. -
getOutline
Returns a Shape whose interior corresponds to the visual representation of this GlyphVector, offset to x, y. -
getGeometricBounds
Rectangle2D getGeometricBounds()Returns the visual bounds of this GlyphVector The visual bounds is the tightest rectangle enclosing all non-background pixels in the rendered representation of this GlyphVector. -
getBounds2D
Returns a tight bounds on the GylphVector including stroking.- Parameters:
aci
- Required to get painting attributes of glyphVector.
-
performDefaultLayout
void performDefaultLayout()Assigns default positions to each glyph in this GlyphVector. -
setGlyphPosition
Sets the position of the specified glyph within this GlyphVector. -
setGlyphTransform
Sets the transform of the specified glyph within this GlyphVector. -
setGlyphVisible
void setGlyphVisible(int glyphIndex, boolean visible) Tells the glyph vector whether or not to draw the specified glyph. -
isGlyphVisible
boolean isGlyphVisible(int glyphIndex) Returns true if specified glyph will be drawn. -
getCharacterCount
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.
-
isReversed
boolean isReversed()Return true if glyphs have been reversed. -
maybeReverse
void maybeReverse(boolean mirror) Reverse (and optionally mirror) glyphs if not already reversed. -
draw
Draws the glyph vector.
-