/** * 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 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)); }