ShapeGraphicAttribute class is an implementation of
GraphicAttribute that draws shapes in a TextLayout.
GraphicAttribute
| Modifier and Type | Field and Description |
|---|---|
| public static final boolean | FILL
A key indicating the shape should be filled. |
| private Shape | |
| private Rectangle2D | |
| private boolean | |
| public static final boolean | STROKE
A key indicating the shape should be stroked with a 1-pixel wide stroke. |
| Access | Constructor and Description |
|---|---|
| public | ShapeGraphicAttribute(Shape
the shape, int Shape to render. The
Shape is rendered with its origin at the origin of
this ShapeGraphicAttribute in the
host TextLayout. This object maintains a reference to
shape.one of the alignments from this
alignment, boolean ShapeGraphicAttribute.true if the Shape should be
stroked; false if the Shape should be
filled.Constructs a |
| Modifier and Type | Method and Description |
|---|---|
| public void | draw(Graphics2D graphics, float x, float y)
Implements abstract java. Renders this |
| public boolean | Returns: true if this
ShapeGraphicAttribute equals rhs;
false otherwise.the rhs)Object to compare for equalityOverrides java. Compares this |
| public boolean | Returns: true if this
ShapeGraphicAttribute equals rhs;
false otherwise.the rhs)ShapeGraphicAttribute to compare for
equalityCompares this |
| public float | Returns: the advance of thisShapeGraphicAttribute.Implements abstract java. Returns the advance of this |
| public float | Returns: the ascent of thisShapeGraphicAttribute.Implements abstract java. Returns the ascent of this |
| public Rectangle2D | Returns: aRectangle2D that encloses all of the bits
rendered by this ShapeGraphicAttribute.Overrides java. Returns a |
| public float | Returns: the descent of thisShapeGraphicAttribute.Implements abstract java. Returns the descent of this |
| public Shape | Returns: theShape representing this graphic attribute,
suitable for stroking or filling.an optional tx)AffineTransform to apply to the
this ShapeGraphicAttribute. This can be null.Overrides java. Return a |
| public int | Returns: a hash code value for thisShapeGraphicAttribute.Overrides java. Returns a hashcode for this |
| FILL | back to summary |
|---|---|
| public static final boolean FILL A key indicating the shape should be filled. | |
| fShape | back to summary |
|---|---|
| private Shape fShape | |
| fShapeBounds | back to summary |
|---|---|
| private Rectangle2D fShapeBounds | |
| fStroke | back to summary |
|---|---|
| private boolean fStroke | |
| STROKE | back to summary |
|---|---|
| public static final boolean STROKE A key indicating the shape should be stroked with a 1-pixel wide stroke. | |
| ShapeGraphicAttribute | back to summary |
|---|---|
| public ShapeGraphicAttribute(Shape shape, int alignment, boolean stroke) Constructs a
| |
| draw | back to summary |
|---|---|
| public void draw(Graphics2D graphics, float x, float y) Implements abstract java. Doc from java. Renders this | |
| equals | back to summary |
|---|---|
| public boolean equals(Object rhs) Overrides java. Compares this
| |
| equals | back to summary |
|---|---|
| public boolean equals(ShapeGraphicAttribute rhs) Compares this
| |
| getAdvance | back to summary |
|---|---|
| public float getAdvance() Implements abstract java. Returns the advance of this
| |
| getAscent | back to summary |
|---|---|
| public float getAscent() Implements abstract java. Returns the ascent of this
| |
| getBounds | back to summary |
|---|---|
| public Rectangle2D getBounds() Overrides java. Returns a
| |
| getDescent | back to summary |
|---|---|
| public float getDescent() Implements abstract java. Returns the descent of this
| |
| getOutline | back to summary |
|---|---|
| public Shape getOutline(AffineTransform tx) Overrides java. Return a
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns a hashcode for this
| |