|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.batik.gvt.font.SVGGVTGlyphVector
public final class SVGGVTGlyphVector
A GVTGlyphVector class for SVG fonts.
| Field Summary | |
|---|---|
static AttributedCharacterIterator.Attribute |
PAINT_INFO
|
| Constructor Summary | |
|---|---|
SVGGVTGlyphVector(GVTFont font,
Glyph[] glyphs,
FontRenderContext frc)
Constructs an SVGGVTGlyphVector. |
|
| Method Summary | |
|---|---|
void |
draw(Graphics2D graphics2D,
AttributedCharacterIterator aci)
Draws this glyph vector. |
Rectangle2D |
getBounds2D(AttributedCharacterIterator aci)
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. |
GVTFont |
getFont()
Returns the Font associated with this GlyphVector. |
FontRenderContext |
getFontRenderContext()
Returns the FontRenderContext associated with this GlyphVector. |
Rectangle2D |
getGeometricBounds()
Returns the geometric bounds of this GlyphVector. |
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. |
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. |
GlyphJustificationInfo |
getGlyphJustificationInfo(int glyphIndex)
Returns the justification information for the glyph at the specified index into this GlyphVector. |
Shape |
getGlyphLogicalBounds(int glyphIndex)
Returns the logical bounds of the specified glyph within this GlyphVector. |
GVTGlyphMetrics |
getGlyphMetrics(int idx)
Returns the metrics of the glyph at the specified index into this GlyphVector. |
Shape |
getGlyphOutline(int glyphIndex)
Returns a Shape whose interior corresponds to the visual representation of the specified glyph within this GlyphVector. |
Point2D |
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 glyphs |
AffineTransform |
getGlyphTransform(int glyphIndex)
Gets the transform of the specified glyph within this GlyphVector. |
Shape |
getGlyphVisualBounds(int glyphIndex)
Returns the visual bounds of the specified glyph within the GlyphVector. |
Rectangle2D |
getLogicalBounds()
Returns the logical bounds of this GlyphVector. |
int |
getNumGlyphs()
Returns the number of glyphs in this GlyphVector. |
Shape |
getOutline()
Returns a Shape whose interior corresponds to the visual representation of this GlyphVector. |
Shape |
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 rendered. |
boolean |
isReversed()
Return true if glyphs have been reversed. |
void |
maybeReverse(boolean mirror)
Reverse (and optionally mirror) glyphs if not already reversed. |
void |
performDefaultLayout()
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final AttributedCharacterIterator.Attribute PAINT_INFO
| Constructor Detail |
|---|
public SVGGVTGlyphVector(GVTFont font,
Glyph[] glyphs,
FontRenderContext frc)
font - The font that is creating this glyph vector.glyphs - An array containing the glyphs that form the basis for this
glyph vector.frc - The current font render context.| Method Detail |
|---|
public GVTFont getFont()
getFont in interface GVTGlyphVectorpublic FontRenderContext getFontRenderContext()
getFontRenderContext in interface GVTGlyphVector
public int getGlyphCode(int glyphIndex)
throws IndexOutOfBoundsException
getGlyphCode in interface GVTGlyphVectorIndexOutOfBoundsException
public int[] getGlyphCodes(int beginGlyphIndex,
int numEntries,
int[] codeReturn)
throws IndexOutOfBoundsException,
IllegalArgumentException
getGlyphCodes in interface GVTGlyphVectorIndexOutOfBoundsException
IllegalArgumentExceptionpublic GlyphJustificationInfo getGlyphJustificationInfo(int glyphIndex)
getGlyphJustificationInfo in interface GVTGlyphVectorpublic Shape getGlyphLogicalBounds(int glyphIndex)
getGlyphLogicalBounds in interface GVTGlyphVectorpublic GVTGlyphMetrics getGlyphMetrics(int idx)
getGlyphMetrics in interface GVTGlyphVectorpublic Shape getGlyphOutline(int glyphIndex)
getGlyphOutline in interface GVTGlyphVectorpublic Rectangle2D getGlyphCellBounds(int glyphIndex)
getGlyphCellBounds in interface GVTGlyphVectorpublic Point2D getGlyphPosition(int glyphIndex)
getGlyphPosition in interface GVTGlyphVector
public float[] getGlyphPositions(int beginGlyphIndex,
int numEntries,
float[] positionReturn)
getGlyphPositions in interface GVTGlyphVectorpublic AffineTransform getGlyphTransform(int glyphIndex)
getGlyphTransform in interface GVTGlyphVectorpublic Shape getGlyphVisualBounds(int glyphIndex)
getGlyphVisualBounds in interface GVTGlyphVectorpublic Rectangle2D getBounds2D(AttributedCharacterIterator aci)
getBounds2D in interface GVTGlyphVectoraci - Required to get painting attributes of glyphVector.public Rectangle2D getLogicalBounds()
getLogicalBounds in interface GVTGlyphVectorpublic int getNumGlyphs()
getNumGlyphs in interface GVTGlyphVectorpublic Shape getOutline()
getOutline in interface GVTGlyphVector
public Shape getOutline(float x,
float y)
getOutline in interface GVTGlyphVectorpublic Rectangle2D getGeometricBounds()
getGeometricBounds in interface GVTGlyphVectorpublic void performDefaultLayout()
performDefaultLayout in interface GVTGlyphVector
public void setGlyphPosition(int glyphIndex,
Point2D newPos)
throws IndexOutOfBoundsException
setGlyphPosition in interface GVTGlyphVectorIndexOutOfBoundsException
public void setGlyphTransform(int glyphIndex,
AffineTransform newTX)
setGlyphTransform in interface GVTGlyphVector
public void setGlyphVisible(int glyphIndex,
boolean visible)
setGlyphVisible in interface GVTGlyphVectorpublic boolean isGlyphVisible(int glyphIndex)
isGlyphVisible in interface GVTGlyphVector
public int getCharacterCount(int startGlyphIndex,
int endGlyphIndex)
getCharacterCount in interface GVTGlyphVectorstartGlyphIndex - The index of the first glyph in the range.endGlyphIndex - The index of the last glyph in the range.
public boolean isReversed()
GVTGlyphVector
isReversed in interface GVTGlyphVectorpublic void maybeReverse(boolean mirror)
GVTGlyphVector
maybeReverse in interface GVTGlyphVector
public void draw(Graphics2D graphics2D,
AttributedCharacterIterator aci)
draw in interface GVTGlyphVector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||