public final class ImageGraphicAttribute extends GraphicAttribute
GraphicAttribute
BOTTOM_ALIGNMENT, CENTER_BASELINE, HANGING_BASELINE, ROMAN_BASELINE, TOP_ALIGNMENT| Constructor and Description |
|---|
ImageGraphicAttribute(Image image, int alignment)
从指定的
ImageGraphicAttribute
Image建设。
|
ImageGraphicAttribute(Image image, int alignment, float originX, float originY)
构建了从指定的
ImageGraphicAttribute
Image。
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(Graphics2D graphics, float x, float y)
使得这
GraphicAttribute在指定位置。
|
boolean |
equals(ImageGraphicAttribute rhs)
比较这
ImageGraphicAttribute到指定的
ImageGraphicAttribute。
|
boolean |
equals(Object rhs)
比较这
ImageGraphicAttribute到指定的
Object。
|
float |
getAdvance()
返回该
ImageGraphicAttribute前进。
|
float |
getAscent()
返回该
ImageGraphicAttribute上升。
|
Rectangle2D |
getBounds()
返回一个
Rectangle2D包围所有的比特被这
ImageGraphicAttribute,相对于绘制位置。
|
float |
getDescent()
返回该
ImageGraphicAttribute下降。
|
int |
hashCode()
返回该
ImageGraphicAttribute hashCode。
|
getAlignment, getJustificationInfo, getOutlinepublic ImageGraphicAttribute(Image image, int alignment)
ImageGraphicAttribute
Image建设。的起源是在(0, 0)。
image渲染这个
ImageGraphicAttribute的
Image。这个对象保持一个参考
image。
alignment -这个
ImageGraphicAttribute路线
public ImageGraphicAttribute(Image image, int alignment, float originX, float originY)
ImageGraphicAttribute
Image。点(
originX,
originY)在
Image出现在文本中的
ImageGraphicAttribute起源。
image渲染这个
ImageGraphicAttribute的
Image。这个对象保持一个参考
image。
alignment -这个
ImageGraphicAttribute路线
originX的x坐标的点在
Image在文本行的
ImageGraphicAttribute起源出现。
originY - Y坐标的点在
Image在文本行的
ImageGraphicAttribute起源出现。
public float getAscent()
ImageGraphicAttribute上升。一个
ImageGraphicAttribute上升是从图像的顶部到原点的距离。
getAscent 方法重写,继承类
GraphicAttribute
ImageGraphicAttribute上升。
GraphicAttribute.getBounds()
public float getDescent()
ImageGraphicAttribute下降。一个
ImageGraphicAttribute下降从起源到图像底部的距离。
getDescent 方法重写,继承类
GraphicAttribute
ImageGraphicAttribute下降。
GraphicAttribute.getBounds()
public float getAdvance()
ImageGraphicAttribute前进。一个
ImageGraphicAttribute提前从起源到图像的右边缘的距离。
getAdvance 方法重写,继承类
GraphicAttribute
ImageGraphicAttribute前进。
GraphicAttribute.getBounds()
public Rectangle2D getBounds()
Rectangle2D包围所有的比特被这
ImageGraphicAttribute,相对于绘制位置。一个图形可以超越它的起源,上升,下降,或提前,但如果是,该方法的实施必须表明图形呈现的地方。
getBounds 方法重写,继承类
GraphicAttribute
Rectangle2D包围所有的比特被这
ImageGraphicAttribute。
public void draw(Graphics2D graphics, float x, float y)
GraphicAttribute在指定位置。
draw 方法重写,继承类
GraphicAttribute
graphics -
Graphics2D,渲染图形
x -用户空间X坐标,图形渲染
y -用户空间Y坐标,图形渲染
public int hashCode()
ImageGraphicAttribute hashCode。
hashCode 方法重写,继承类
Object
Object.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)
public boolean equals(Object rhs)
ImageGraphicAttribute到指定的
Object。
equals 方法重写,继承类
Object
rhs -
Object比较平等
true
ImageGraphicAttribute等于
rhs;
false否则。
Object.hashCode(),
HashMap
public boolean equals(ImageGraphicAttribute rhs)
ImageGraphicAttribute到指定的
ImageGraphicAttribute。
rhs -
ImageGraphicAttribute比较平等
true
ImageGraphicAttribute等于
rhs;
false否则。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.