| |
|
| java.lang.Object java.awt.font.GraphicAttribute java.awt.font.ShapeGraphicAttribute
Field Summary | |
final public static boolean | FILL A key indicating the shape should be filled. | final public static boolean | STROKE A key indicating the shape should be stroked with a 1-pixel wide stroke. |
Constructor Summary | |
public | ShapeGraphicAttribute(Shape shape, int alignment, boolean stroke) Constructs a ShapeGraphicAttribute for the specified
Shape .
Parameters: shape - the Shape to render. |
Method Summary | |
public void | draw(Graphics2D graphics, float x, float y) | public boolean | equals(Object rhs) Compares this ShapeGraphicAttribute to the specified
Object . | public boolean | equals(ShapeGraphicAttribute rhs) Compares this ShapeGraphicAttribute to the specified
ShapeGraphicAttribute . | public float | getAdvance() Returns the advance of this ShapeGraphicAttribute . | public float | getAscent() Returns the ascent of this ShapeGraphicAttribute . | public Rectangle2D | getBounds() Returns a
Rectangle2D that encloses all of the
bits drawn by this ShapeGraphicAttribute relative to
the rendering position. | public float | getDescent() Returns the descent of this ShapeGraphicAttribute . | public Shape | getOutline(AffineTransform tx) Return a
java.awt.Shape that represents the region that
this ShapeGraphicAttribute renders. | public int | hashCode() Returns a hashcode for this ShapeGraphicAttribute . |
FILL | final public static boolean FILL(Code) | | A key indicating the shape should be filled.
|
STROKE | final public static boolean STROKE(Code) | | A key indicating the shape should be stroked with a 1-pixel wide stroke.
|
ShapeGraphicAttribute | public ShapeGraphicAttribute(Shape shape, int alignment, boolean stroke)(Code) | | Constructs a ShapeGraphicAttribute for the specified
Shape .
Parameters: shape - the Shape to render. The Shape is rendered with its origin at the origin ofthis ShapeGraphicAttribute in thehost TextLayout . This object maintains a reference toshape . Parameters: alignment - one of the alignments from thisShapeGraphicAttribute . Parameters: stroke - true if the Shape should bestroked; false if the Shape should befilled. |
equals | public boolean equals(Object rhs)(Code) | | Compares this ShapeGraphicAttribute to the specified
Object .
Parameters: rhs - the Object to compare for equality true if thisShapeGraphicAttribute equals rhs ;false otherwise. |
equals | public boolean equals(ShapeGraphicAttribute rhs)(Code) | | Compares this ShapeGraphicAttribute to the specified
ShapeGraphicAttribute .
Parameters: rhs - the ShapeGraphicAttribute to compare forequality true if thisShapeGraphicAttribute equals rhs ;false otherwise. |
getAdvance | public float getAdvance()(Code) | | Returns the advance of this ShapeGraphicAttribute .
The advance of a ShapeGraphicAttribute is the distance
from the origin of its Shape to the right side of the
bounds of its Shape .
the advance of this ShapeGraphicAttribute . |
getAscent | public float getAscent()(Code) | | Returns the ascent of this ShapeGraphicAttribute . The
ascent of a ShapeGraphicAttribute is the positive
distance from the origin of its Shape to the top of
bounds of its Shape .
the ascent of this ShapeGraphicAttribute . |
getBounds | public Rectangle2D getBounds()(Code) | | Returns a
Rectangle2D that encloses all of the
bits drawn by this ShapeGraphicAttribute relative to
the rendering position. A graphic can be rendered beyond its
origin, ascent, descent, or advance; but if it does, this method's
implementation should indicate where the graphic is rendered.
a Rectangle2D that encloses all of the bitsrendered by this ShapeGraphicAttribute . |
getDescent | public float getDescent()(Code) | | Returns the descent of this ShapeGraphicAttribute .
The descent of a ShapeGraphicAttribute is the distance
from the origin of its Shape to the bottom of the
bounds of its Shape .
the descent of this ShapeGraphicAttribute . |
getOutline | public Shape getOutline(AffineTransform tx)(Code) | | Return a
java.awt.Shape that represents the region that
this ShapeGraphicAttribute renders. This is used when a
TextLayout is requested to return the outline of the text.
The (untransformed) shape must not extend outside the rectangular
bounds returned by getBounds .
Parameters: tx - an optional AffineTransform to apply to thethis ShapeGraphicAttribute . This can be null. the Shape representing this graphic attribute,suitable for stroking or filling. since: 1.6 |
hashCode | public int hashCode()(Code) | | Returns a hashcode for this ShapeGraphicAttribute .
a hash code value for thisShapeGraphicAttribute . |
|
|
|