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, getOutline
public 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.