/** * 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 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 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 the logical bounds of this GlyphVector. * This is a bound useful for hit detection and highlighting. */ public Rectangle2D getLogicalBounds() { if (logicalBounds == null) { GeneralPath logicalBoundsPath = new GeneralPath(); for (int i = 0; i < getNumGlyphs(); i++) { Shape glyphLogicalBounds = getGlyphLogicalBounds(i); if (glyphLogicalBounds != null) { logicalBoundsPath.append(glyphLogicalBounds, false); } } logicalBounds = logicalBoundsPath.getBounds2D(); } return logicalBounds; }
/** * Returns the logical bounds of this GlyphVector. * This is a bound useful for hit detection and highlighting. */ public Rectangle2D getLogicalBounds() { if (logicalBounds == null) { GeneralPath logicalBoundsPath = new GeneralPath(); for (int i = 0; i < getNumGlyphs(); i++) { Shape glyphLogicalBounds = getGlyphLogicalBounds(i); if (glyphLogicalBounds != null) { logicalBoundsPath.append(glyphLogicalBounds, false); } } logicalBounds = logicalBoundsPath.getBounds2D(); } return logicalBounds; }
/** * Returns the logical bounds of this GlyphVector. * This is a bound useful for hit detection and highlighting. */ public Rectangle2D getLogicalBounds() { if (logicalBounds == null) { GeneralPath logicalBoundsPath = new GeneralPath(); for (int i = 0; i < getNumGlyphs(); i++) { Shape glyphLogicalBounds = getGlyphLogicalBounds(i); if (glyphLogicalBounds != null) { logicalBoundsPath.append(glyphLogicalBounds, false); } } logicalBounds = logicalBoundsPath.getBounds2D(); } return logicalBounds; }