Methods Summary |
---|
public abstract boolean | equals(java.awt.font.GlyphVector glyphVector)Compares this GlyphVector with the specified GlyphVector objects.
|
public abstract java.awt.Font | getFont()Gets the font of this GlyphVector.
|
public abstract java.awt.font.FontRenderContext | getFontRenderContext()Gets the FontRenderContext of this GlyphVector.
|
public int | getGlyphCharIndex(int glyphIndex)Gets the first logical character's index of the specified glyph.
// default implemetation one-to-one
return glyphIndex;
|
public int[] | getGlyphCharIndices(int beginGlyphIndex, int numEntries, int[] codeReturn)Gets an array of the character indices of the specified glyphs.
if (codeReturn == null) {
codeReturn = new int[numEntries];
}
for (int i = 0; i < numEntries; i++) {
codeReturn[i] = getGlyphCharIndex(i + beginGlyphIndex);
}
return codeReturn;
|
public abstract int | getGlyphCode(int glyphIndex)Gets the glyph code of the specified glyph.
|
public abstract int[] | getGlyphCodes(int beginGlyphIndex, int numEntries, int[] codeReturn)Gets an array of the glyph codes of the specified glyphs.
|
public abstract java.awt.font.GlyphJustificationInfo | getGlyphJustificationInfo(int glyphIndex)Gets the justification information of the glyph whose index is specified.
|
public abstract java.awt.Shape | getGlyphLogicalBounds(int glyphIndex)Gets the logical bounds of the specified glyph in the GlyphVector.
|
public abstract java.awt.font.GlyphMetrics | getGlyphMetrics(int glyphIndex)Gets the metrics of the glyph with the specified index in this
GlyphVector.
|
public java.awt.Shape | getGlyphOutline(int glyphIndex, float x, float y)Gets a Shape object which defines the visual representation of the
specified glyph in this GlyphVector, translated a distance of x in the X
direction and y in the Y direction.
Shape initialShape = getGlyphOutline(glyphIndex);
AffineTransform trans = AffineTransform.getTranslateInstance(x, y);
return trans.createTransformedShape(initialShape);
|
public abstract java.awt.Shape | getGlyphOutline(int glyphIndex)Gets a Shape object which defines the visual representation of the
specified glyph in this GlyphVector.
|
public java.awt.Rectangle | getGlyphPixelBounds(int index, java.awt.font.FontRenderContext frc, float x, float y)Gets the pixel bounds of the glyph with the specified index in this
GlyphVector which is rendered with the specified FontRenderContext at the
specified location.
Rectangle2D visualRect = getGlyphVisualBounds(index).getBounds2D();
int minX = (int)Math.floor(visualRect.getMinX() + x);
int minY = (int)Math.floor(visualRect.getMinY() + y);
int width = (int)Math.ceil(visualRect.getMaxX() + x) - minX;
int height = (int)Math.ceil(visualRect.getMaxY() + y) - minY;
return new Rectangle(minX, minY, width, height);
|
public abstract java.awt.geom.Point2D | getGlyphPosition(int glyphIndex)Gets the position of the specified glyph in this GlyphVector.
|
public abstract float[] | getGlyphPositions(int beginGlyphIndex, int numEntries, float[] positionReturn)Gets an array of the positions of the specified glyphs in this
GlyphVector.
|
public abstract java.awt.geom.AffineTransform | getGlyphTransform(int glyphIndex)Gets the transform of the specified glyph in this GlyphVector.
|
public abstract java.awt.Shape | getGlyphVisualBounds(int glyphIndex)Gets the visual bounds of the specified glyph in the GlyphVector.
|
public int | getLayoutFlags()Gets flags which describe the global state of the GlyphVector. The
default implementation returns 0.
// default implementation - returned value is 0
return 0;
|
public abstract java.awt.geom.Rectangle2D | getLogicalBounds()Gets the logical bounds of the GlyphVector.
|
public abstract int | getNumGlyphs()Gets the number of glyphs in the GlyphVector.
|
public abstract java.awt.Shape | getOutline(float x, float y)Gets the visual representation of this GlyphVector rendered in x, y
location as a Shape object.
|
public abstract java.awt.Shape | getOutline()Gets the visual representation of this GlyphVector as a Shape object.
|
public java.awt.Rectangle | getPixelBounds(java.awt.font.FontRenderContext frc, float x, float y)Gets the pixel bounds of the GlyphVector when rendered at the specified
location with the specified FontRenderContext.
// default implementation - integer Rectangle, that encloses visual
// bounds rectangle
Rectangle2D visualRect = getVisualBounds();
int minX = (int)Math.floor(visualRect.getMinX() + x);
int minY = (int)Math.floor(visualRect.getMinY() + y);
int width = (int)Math.ceil(visualRect.getMaxX() + x) - minX;
int height = (int)Math.ceil(visualRect.getMaxY() + y) - minY;
return new Rectangle(minX, minY, width, height);
|
public abstract java.awt.geom.Rectangle2D | getVisualBounds()Gets the visual bounds of the GlyphVector.
|
public abstract void | performDefaultLayout()Sets default layout to this GlyphVector.
|
public abstract void | setGlyphPosition(int glyphIndex, java.awt.geom.Point2D newPos)Sets the position of the specified glyph in this GlyphVector.
|
public abstract void | setGlyphTransform(int glyphIndex, java.awt.geom.AffineTransform trans)Sets the affine transform to a glyph with the specified index in this
GlyphVector.
|