Methods Summary |
---|
public void | draw(java.awt.Graphics2D g2, float x, float y)
AffineTransform at = AffineTransform.getTranslateInstance(x, y);
if (fStroke == STROKE) {
Stroke oldStroke = g2.getStroke();
g2.setStroke(new BasicStroke());
g2.draw(at.createTransformedShape(fShape));
g2.setStroke(oldStroke);
} else {
g2.fill(at.createTransformedShape(fShape));
}
|
public boolean | equals(java.awt.font.ShapeGraphicAttribute sga)Compares this ShapeGraphicAttribute object to the specified
ShapeGraphicAttribute object.
if (sga == null) {
return false;
}
if (sga == this) {
return true;
}
return (fStroke == sga.fStroke && getAlignment() == sga.getAlignment() && fShape
.equals(sga.fShape));
|
public boolean | equals(java.lang.Object obj)Compares this ShapeGraphicAttribute object to the specified Object.
try {
return equals((ShapeGraphicAttribute)obj);
} catch (ClassCastException e) {
return false;
}
|
public float | getAdvance()
return Math.max(0, fShapeWidth + fOriginX);
|
public float | getAscent()
return Math.max(0, -fOriginY);
|
public java.awt.geom.Rectangle2D | getBounds()
return (Rectangle2D)fBounds.clone();
|
public float | getDescent()
return Math.max(0, fShapeHeight + fOriginY);
|
public int | hashCode()Returns a hash code of this ShapeGraphicAttribute object.
HashCode hash = new HashCode();
hash.append(fShape.hashCode());
hash.append(getAlignment());
return hash.hashCode();
|