/** * Returns the logical bounds of the specified glyph within this * GlyphVector. */ public Shape getGlyphLogicalBounds(int glyphIndex) { int idx = getGVIdx(glyphIndex); return gvs[idx].getGlyphLogicalBounds(glyphIndex-off[idx]); }
/** * Returns the bounding box of the specified glyph, considering only the * glyph's metrics (ascent, descent, advance) rather than the actual glyph * shape. */ public Rectangle2D getGlyphCellBounds(int glyphIndex) { return getGlyphLogicalBounds(glyphIndex).getBounds2D(); }
/** * Returns a Shape whose interior corresponds to the visual representation * of this GlyphVector, offset to x, y. */ public Shape getOutline(float x, float y) { Shape outline = getOutline(); AffineTransform tr = AffineTransform.getTranslateInstance(x,y); outline = tr.createTransformedShape(outline); return outline; }
gvl.add(gl.getGlyphVector()); GVTGlyphVector gv = new MultiGlyphVector(gvl);
gvl.add(gl.getGlyphVector()); GVTGlyphVector gv = new MultiGlyphVector(gvl);
/** * Sets the position of the specified glyph within this GlyphVector. */ public void setGlyphPosition(int glyphIndex, Point2D newPos) { int idx = getGVIdx(glyphIndex); // System.out.println("setting: " + idx + " - " + (glyphIndex-off[idx]) + // " -> " + newPos); gvs[idx].setGlyphPosition(glyphIndex-off[idx], newPos); }
gvl.add(gl.getGlyphVector()); GVTGlyphVector gv = new MultiGlyphVector(gvl);
/** * Returns the bounding box of the specified glyph, considering only the * glyph's metrics (ascent, descent, advance) rather than the actual glyph * shape. */ public Rectangle2D getGlyphCellBounds(int glyphIndex) { return getGlyphLogicalBounds(glyphIndex).getBounds2D(); }
/** * Returns a Shape whose interior corresponds to the visual representation * of this GlyphVector, offset to x, y. */ public Shape getOutline(float x, float y) { Shape outline = getOutline(); AffineTransform tr = AffineTransform.getTranslateInstance(x,y); outline = tr.createTransformedShape(outline); return outline; }
/** * Returns the glyphcode of the specified glyph. */ public int getGlyphCode(int glyphIndex) { int idx = getGVIdx(glyphIndex); return gvs[idx].getGlyphCode(glyphIndex-off[idx]); }
gvl.add(gl.getGlyphVector()); GVTGlyphVector gv = new MultiGlyphVector(gvl); gvs[chunk] = gv; int numGlyphs = gv.getNumGlyphs();
/** * Returns the bounding box of the specified glyph, considering only the * glyph's metrics (ascent, descent, advance) rather than the actual glyph * shape. */ public Rectangle2D getGlyphCellBounds(int glyphIndex) { return getGlyphLogicalBounds(glyphIndex).getBounds2D(); }
/** * Returns a Shape whose interior corresponds to the visual representation * of this GlyphVector, offset to x, y. */ public Shape getOutline(float x, float y) { Shape outline = getOutline(); AffineTransform tr = AffineTransform.getTranslateInstance(x,y); outline = tr.createTransformedShape(outline); return outline; }
/** * Sets the position of the specified glyph within this GlyphVector. */ public void setGlyphPosition(int glyphIndex, Point2D newPos) { int idx = getGVIdx(glyphIndex); // System.out.println("setting: " + idx + " - " + (glyphIndex-off[idx]) + // " -> " + newPos); gvs[idx].setGlyphPosition(glyphIndex-off[idx], newPos); }
gvl.add(gl.getGlyphVector()); GVTGlyphVector gv = new MultiGlyphVector(gvl); gvs[chunk] = gv; int numGlyphs = gv.getNumGlyphs();
/** * Returns the number of chars represented by the glyphs within the * specified range. * * @param startGlyphIndex The index of the first glyph in the range. * @param endGlyphIndex The index of the last glyph in the range. * @return The number of chars. */ public int getCharacterCount(int startGlyphIndex, int endGlyphIndex) { int idx1 = getGVIdx(startGlyphIndex); int idx2 = getGVIdx(endGlyphIndex); int ret=0; for (int idx=idx1; idx<=idx2; idx++) { int gi1 = startGlyphIndex-off[idx]; int gi2 = endGlyphIndex-off[idx]; if (gi2 >= nGlyphs[idx]) { gi2 = nGlyphs[idx]-1; } ret += gvs[idx].getCharacterCount(gi1, gi2); startGlyphIndex += (gi2-gi1+1); } return ret; }
gvl.add(gl.getGlyphVector()); GVTGlyphVector gv = new MultiGlyphVector(gvl); gvs[chunk] = gv; int numGlyphs = gv.getNumGlyphs();
/** * Returns the justification information for the glyph at the specified * index into this GlyphVector. */ public GlyphJustificationInfo getGlyphJustificationInfo(int glyphIndex) { int idx = getGVIdx(glyphIndex); return gvs[idx].getGlyphJustificationInfo(glyphIndex-off[idx]); }
/** * Gets the transform of the specified glyph within this GlyphVector. */ public AffineTransform getGlyphTransform(int glyphIndex) { int idx = getGVIdx(glyphIndex); return gvs[idx].getGlyphTransform(glyphIndex-off[idx]); }
/** * Returns the logical bounds of the specified glyph within this * GlyphVector. */ public Shape getGlyphLogicalBounds(int glyphIndex) { int idx = getGVIdx(glyphIndex); return gvs[idx].getGlyphLogicalBounds(glyphIndex-off[idx]); }