is new.
java.lang.Objectjava.awt.font.GraphicAttribute
java.awt.font.ImageGraphicAttribute
public final class ImageGraphicAttribute
The ImageGraphicAttribute class is an implementation of GraphicAttribute which draws images in a TextLayout .
| Field Summary |
|---|
| Fields inherited from class java.awt.font. GraphicAttribute |
|---|
| BOTTOM_ALIGNMENT , CENTER_BASELINE , HANGING_BASELINE , ROMAN_BASELINE , TOP_ALIGNMENT |
| Constructor Summary | |
|---|---|
|
ImageGraphicAttribute
(
Image
image, int alignment) Constucts an ImageGraphicAttribute from the specified Image . |
|
|
ImageGraphicAttribute
(
Image
image, int alignment, float originX, float originY) Constructs an ImageGraphicAttribute from the specified Image. |
|
| Method Summary | |
|---|---|
| void |
draw
(
Graphics2D
Renders
this GraphicAttribute
|
| boolean |
equals
(
ImageGraphicAttribute
rhs) Compares this ImageGraphicAttribute to the specified ImageGraphicAttribute. |
| boolean |
equals
(
Object
rhs) Compares this ImageGraphicAttribute to the specified Object . |
| float |
getAdvance
() Returns the advance of this ImageGraphicAttribute. |
| float |
getAscent
() Returns the ascent of this ImageGraphicAttribute. |
| Rectangle2D |
getBounds
() Returns a Rectangle2D that encloses all of the bits rendered by this ImageGraphicAttribute, relative to the rendering position. |
| float |
getDescent
() Returns the descent of this ImageGraphicAttribute. |
| int |
hashCode
() Returns a hashcode for this ImageGraphicAttribute. |
| Methods inherited from class java.awt.font. GraphicAttribute |
|---|
| getAlignment , getJustificationInfo , getOutline |
| Methods inherited from class java.lang. Object |
|---|
| clone , finalize , getClass , notify , notifyAll , toString , wait , wait , wait |
| Constructor Detail |
|---|
public ImageGraphicAttribute(Image image,
int alignment)
public ImageGraphicAttribute(Image image,
int alignment,
float originX,
float originY)
originX
X coordinate
originY - the Y coordinate of the point within the Image that appears at the origin of the ImageGraphicAttribute in the text line.
| Method Detail |
|---|
public float getAscent()
public float getDescent()
public float getAdvance()
public Rectangle2D getBounds()
public void draw(Graphics2D graphics,
float x,
float y)
this GraphicAttribute
x - the user-space X coordinate where the graphic is rendered
y - the user-space Y coordinate where the graphic is rendered
public int hashCode()
public boolean equals(Object rhs)
public boolean equals(ImageGraphicAttribute rhs)