java.awt.font
public final class ShapeGraphicAttribute extends GraphicAttribute
| Field Summary | |
|---|---|
| static boolean | FILL  True if the shape should be filled.  | 
| static boolean | STROKE  True if the shape should be stroked with a 1-pixel wide stroke.  | 
| Constructor Summary | |
|---|---|
| ShapeGraphicAttribute(Shape shape, int alignment, boolean stroke) 
 Constructor.
  | |
| Method Summary | |
|---|---|
| void | draw(Graphics2D graphics, float x, float y) 
 Draws the graphic at the given location.
  | 
| boolean | equals(Object obj) 
 Compares this ShapeGraphicAttribute to obj.
  | 
| boolean | equals(ShapeGraphicAttribute rhs) 
 Compares this ShapeGraphicAttribute to rhs.
  | 
| float | getAdvance() 
 Gets the distance from the origin of its Shape to the right side of the
 bounds of its Shape.
  | 
| float | getAscent() 
 Gets the positive distance from the origin of its Shape to the top of
 bounds.
  | 
| Rectangle2D | getBounds() 
 Returns a Rectangle2D that encloses all of the bits drawn by this shape.
  | 
| float | getDescent() 
 Gets the distance from the origin of its Shape to the bottom of the bounds.
  | 
| int | hashCode() 
 Gets the hash code.
  | 
Parameters: shape - the Shape to render. The Shape is rendered with its origin. alignment - the alignment stroke - true if the Shape should be stroked; false if the Shape should be filled.
Parameters: graphics - the graphics to use. x - the x location to draw at. y - the y location to draw at.
Parameters: obj - the object to compare.
Parameters: rhs - the ShapeGraphicAttribute to compare.
Returns: the advance
Returns: the ascent
Returns: the bounds of the shape.
Returns: the descent
Returns: the hash code.