/** * Returns the logical bounds of this GlyphVector. */ public Rectangle2D getLogicalBounds() { Rectangle2D ret = null; for (GVTGlyphVector gv : gvs) { Rectangle2D b = gv.getLogicalBounds(); if (ret == null) ret = b; //else ret = ret.createUnion(b); else ret.add(b); // same as union } return ret; }
/** * Returns the logical bounds of this GlyphVector. */ public Rectangle2D getLogicalBounds() { Rectangle2D ret = null; for (int idx=0; idx<gvs.length; idx++) { Rectangle2D b = gvs[idx].getLogicalBounds(); if (ret == null) ret = b; //else ret = ret.createUnion(b); else ret.add( b ); // same as union } return ret; }
/** * Returns the logical bounds of this GlyphVector. */ public Rectangle2D getLogicalBounds() { Rectangle2D ret = null; for (GVTGlyphVector gv : gvs) { Rectangle2D b = gv.getLogicalBounds(); if (ret == null) ret = b; //else ret = ret.createUnion(b); else ret.add(b); // same as union } return ret; }
/** * Returns a shape describing the strikethrough line for a given ACI. */ protected Shape getStrikethroughShape() { double y = metrics.getStrikethroughOffset(); float strikethroughThickness = metrics.getStrikethroughThickness(); Stroke strikethroughStroke = new BasicStroke(strikethroughThickness); // Not certain what should be done here... aci.first(); Float dy = (Float) aci.getAttribute(DY); if (dy != null) y += dy; Rectangle2D logicalBounds = gv.getLogicalBounds(); return strikethroughStroke.createStrokedShape( new Line2D.Double( logicalBounds.getMinX() + strikethroughThickness/2.0, offset.getY()+y, logicalBounds.getMaxX() - strikethroughThickness/2.0, offset.getY()+y)); }
/** * Returns a shape describing the strikethrough line for a given ACI. */ protected Shape getStrikethroughShape() { double y = metrics.getStrikethroughOffset(); float strikethroughThickness = metrics.getStrikethroughThickness(); Stroke strikethroughStroke = new BasicStroke(strikethroughThickness); // Not certain what should be done here... aci.first(); Float dy = (Float) aci.getAttribute(DY); if (dy != null) y += dy; Rectangle2D logicalBounds = gv.getLogicalBounds(); return strikethroughStroke.createStrokedShape( new Line2D.Double( logicalBounds.getMinX() + strikethroughThickness/2.0, offset.getY()+y, logicalBounds.getMaxX() - strikethroughThickness/2.0, offset.getY()+y)); }
/** * Returns a shape describing the strikethrough line for a given ACI. */ protected Shape getStrikethroughShape() { double y = metrics.getStrikethroughOffset(); float strikethroughThickness = metrics.getStrikethroughThickness(); Stroke strikethroughStroke = new BasicStroke(strikethroughThickness); // Not certain what should be done here... aci.first(); Float dy = (Float) aci.getAttribute(DY); if (dy != null) y += dy.floatValue(); Rectangle2D logicalBounds = gv.getLogicalBounds(); return strikethroughStroke.createStrokedShape( new Line2D.Double( logicalBounds.getMinX() + strikethroughThickness/2.0, offset.getY()+y, logicalBounds.getMaxX() - strikethroughThickness/2.0, offset.getY()+y)); }
/** * Returns a shape describing the overline decoration for a given ACI. */ protected Shape getOverlineShape() { double y = metrics.getOverlineOffset(); float overlineThickness = metrics.getOverlineThickness(); // need to move the overline a bit lower, // not sure if this is correct behaviour or not y += overlineThickness; // Not certain what should be done here... aci.first(); Float dy = (Float) aci.getAttribute(DY); if (dy != null) y += dy.floatValue(); Stroke overlineStroke = new BasicStroke(overlineThickness); Rectangle2D logicalBounds = gv.getLogicalBounds(); return overlineStroke.createStrokedShape( new Line2D.Double( logicalBounds.getMinX() + overlineThickness/2.0, offset.getY()+y, logicalBounds.getMaxX() - overlineThickness/2.0, offset.getY()+y)); }
/** * Returns a shape describing the undeline decoration for a given ACI. */ protected Shape getUnderlineShape() { double y = metrics.getUnderlineOffset(); float underlineThickness = metrics.getUnderlineThickness(); // need to move the underline a bit lower, // not sure if this is correct behaviour or not y += underlineThickness*1.5; BasicStroke underlineStroke = new BasicStroke(underlineThickness); // Not certain what should be done here... aci.first(); Float dy = (Float) aci.getAttribute(DY); if (dy != null) y += dy.floatValue(); Rectangle2D logicalBounds = gv.getLogicalBounds(); return underlineStroke.createStrokedShape( new Line2D.Double( logicalBounds.getMinX() + underlineThickness/2.0, offset.getY()+y, logicalBounds.getMaxX() - underlineThickness/2.0, offset.getY()+y)); }
/** * Returns a shape describing the overline decoration for a given ACI. */ protected Shape getOverlineShape() { double y = metrics.getOverlineOffset(); float overlineThickness = metrics.getOverlineThickness(); // need to move the overline a bit lower, // not sure if this is correct behaviour or not y += overlineThickness; // Not certain what should be done here... aci.first(); Float dy = (Float) aci.getAttribute(DY); if (dy != null) y += dy; Stroke overlineStroke = new BasicStroke(overlineThickness); Rectangle2D logicalBounds = gv.getLogicalBounds(); return overlineStroke.createStrokedShape( new Line2D.Double( logicalBounds.getMinX() + overlineThickness/2.0, offset.getY()+y, logicalBounds.getMaxX() - overlineThickness/2.0, offset.getY()+y)); }
/** * Returns a shape describing the overline decoration for a given ACI. */ protected Shape getOverlineShape() { double y = metrics.getOverlineOffset(); float overlineThickness = metrics.getOverlineThickness(); // need to move the overline a bit lower, // not sure if this is correct behaviour or not y += overlineThickness; // Not certain what should be done here... aci.first(); Float dy = (Float) aci.getAttribute(DY); if (dy != null) y += dy; Stroke overlineStroke = new BasicStroke(overlineThickness); Rectangle2D logicalBounds = gv.getLogicalBounds(); return overlineStroke.createStrokedShape( new Line2D.Double( logicalBounds.getMinX() + overlineThickness/2.0, offset.getY()+y, logicalBounds.getMaxX() - overlineThickness/2.0, offset.getY()+y)); }
/** * Returns a shape describing the undeline decoration for a given ACI. */ protected Shape getUnderlineShape() { double y = metrics.getUnderlineOffset(); float underlineThickness = metrics.getUnderlineThickness(); // need to move the underline a bit lower, // not sure if this is correct behaviour or not y += underlineThickness*1.5; BasicStroke underlineStroke = new BasicStroke(underlineThickness); // Not certain what should be done here... aci.first(); Float dy = (Float) aci.getAttribute(DY); if (dy != null) y += dy; Rectangle2D logicalBounds = gv.getLogicalBounds(); return underlineStroke.createStrokedShape( new Line2D.Double( logicalBounds.getMinX() + underlineThickness/2.0, offset.getY()+y, logicalBounds.getMaxX() - underlineThickness/2.0, offset.getY()+y)); }
/** * Returns a shape describing the undeline decoration for a given ACI. */ protected Shape getUnderlineShape() { double y = metrics.getUnderlineOffset(); float underlineThickness = metrics.getUnderlineThickness(); // need to move the underline a bit lower, // not sure if this is correct behaviour or not y += underlineThickness*1.5; BasicStroke underlineStroke = new BasicStroke(underlineThickness); // Not certain what should be done here... aci.first(); Float dy = (Float) aci.getAttribute(DY); if (dy != null) y += dy; Rectangle2D logicalBounds = gv.getLogicalBounds(); return underlineStroke.createStrokedShape( new Line2D.Double( logicalBounds.getMinX() + underlineThickness/2.0, offset.getY()+y, logicalBounds.getMaxX() - underlineThickness/2.0, offset.getY()+y)); }
glyphsLength = (float) gv.getLogicalBounds().getWidth(); } else { glyphsLength = (float) gv.getLogicalBounds().getHeight();
glyphsLength = (float) gv.getLogicalBounds().getWidth(); } else { glyphsLength = (float) gv.getLogicalBounds().getHeight();
glyphsLength = (float) gv.getLogicalBounds().getWidth(); } else { glyphsLength = (float) gv.getLogicalBounds().getHeight();
(float) gv.getLogicalBounds().getWidth() : (metrics.getAscent() + Math.abs(metrics.getDescent()));
(float) gv.getLogicalBounds().getWidth() : (metrics.getAscent() + Math.abs(metrics.getDescent()));
(float) gv.getLogicalBounds().getWidth() : (metrics.getAscent() + Math.abs(metrics.getDescent()));