/** * Returns the rectangular bounds of the completed glyph layout. */ public Rectangle2D getBounds2D() { syncLayout(); return gv.getBounds2D(aci); }
/** * Returns the rectangular bounds of the completed glyph layout. */ public Rectangle2D getBounds2D() { syncLayout(); return gv.getBounds2D(aci); }
/** * Returns the rectangular bounds of the completed glyph layout. */ public Rectangle2D getBounds2D() { syncLayout(); return gv.getBounds2D(aci); }
/** * Returns the bounds of this GlyphVector. This includes * stroking effects. */ public Rectangle2D getBounds2D(AttributedCharacterIterator aci) { Rectangle2D ret = null; int begin = aci.getBeginIndex(); for (GVTGlyphVector gv : gvs) { int end = gv.getCharacterCount(0, gv.getNumGlyphs()) + 1; Rectangle2D b = gv.getBounds2D (new AttributedCharacterSpanIterator(aci, begin, end)); if (ret == null) ret = b; //else ret = ret.createUnion(b); else ret.add(b); begin = end; } return ret; }
/** * Returns the bounds of this GlyphVector. This includes * stroking effects. */ public Rectangle2D getBounds2D(AttributedCharacterIterator aci) { Rectangle2D ret = null; int begin = aci.getBeginIndex(); for (int idx=0; idx<gvs.length; idx++) { GVTGlyphVector gv = gvs[idx]; int end = gv.getCharacterCount(0, gv.getNumGlyphs())+1; Rectangle2D b = gvs[idx].getBounds2D (new AttributedCharacterSpanIterator(aci, begin, end)); if (ret == null) ret = b; //else ret = ret.createUnion(b); else ret.add(b); begin = end; } return ret; }
/** * Returns the bounds of this GlyphVector. This includes * stroking effects. */ public Rectangle2D getBounds2D(AttributedCharacterIterator aci) { Rectangle2D ret = null; int begin = aci.getBeginIndex(); for (GVTGlyphVector gv : gvs) { int end = gv.getCharacterCount(0, gv.getNumGlyphs()) + 1; Rectangle2D b = gv.getBounds2D (new AttributedCharacterSpanIterator(aci, begin, end)); if (ret == null) ret = b; //else ret = ret.createUnion(b); else ret.add(b); begin = end; } return ret; }