public final class ImageGraphicAttribute extends GraphicAttribute
ImageGraphicAttribute类的实现GraphicAttribute其绘制的图像TextLayout 。
GraphicAttribute
BOTTOM_ALIGNMENT, CENTER_BASELINE, HANGING_BASELINE, ROMAN_BASELINE, TOP_ALIGNMENT| Constructor and Description |
|---|
ImageGraphicAttribute(Image image, int alignment)
Constucts一个 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进行
ImageGraphicAttribute 。
|
boolean |
equals(Object rhs)
将此 ImageGraphicAttribute与指定的Object进行比较 。
|
float |
getAdvance()
返回此
ImageGraphicAttribute 。
|
float |
getAscent()
返回此
ImageGraphicAttribute的上升。
|
Rectangle2D |
getBounds()
返回一个 Rectangle2D ,它包含相对于渲染位置的由此ImageGraphicAttribute呈现的所有位。
|
float |
getDescent()
返回此
ImageGraphicAttribute的下降。
|
int |
hashCode()
返回此
ImageGraphicAttribute的哈希码。
|
getAlignment, getJustificationInfo, getOutlinepublic ImageGraphicAttribute(Image image, int alignment)
ImageGraphicAttribute从指定的Image 。
原点是(0,0)。
image - 由Image呈现的ImageGraphicAttribute 。
该对象保留对image的image 。
alignment - 这个
ImageGraphicAttribute一个
ImageGraphicAttribute
public ImageGraphicAttribute(Image image, int alignment, float originX, float originY)
ImageGraphicAttribute从指定的Image 。
点( originX , originY的) Image出现在原点ImageGraphicAttribute文本中。
image - 由Image呈现的ImageGraphicAttribute 。
该对象保留引用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在
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进行
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.