java.lang.Object
java.awt.font.GraphicAttribute
java.awt.font.ImageGraphicAttribute
- 参见:
-
字段摘要
在类 java.awt.font.GraphicAttribute 中声明的字段
BOTTOM_ALIGNMENT, CENTER_BASELINE, HANGING_BASELINE, ROMAN_BASELINE, TOP_ALIGNMENT
-
构造方法总结
构造方法构造方法描述ImageGraphicAttribute
(Image image, int alignment) 从指定的Image
构造一个ImageGraphicAttribute
。ImageGraphicAttribute
(Image image, int alignment, float originX, float originY) 从指定的Image
构造一个ImageGraphicAttribute
。 -
方法总结
修饰符和类型方法描述void
draw
(Graphics2D graphics, float x, float y) 在指定位置呈现此GraphicAttribute
。boolean
将此ImageGraphicAttribute
与指定的ImageGraphicAttribute
进行比较。boolean
将此ImageGraphicAttribute
与指定的Object
进行比较。float
返回此ImageGraphicAttribute
的预付款。float
返回此ImageGraphicAttribute
的上升。返回一个Rectangle2D
,它包含此ImageGraphicAttribute
相对于渲染位置渲染的所有位。float
返回此ImageGraphicAttribute
的血统。int
hashCode()
返回此ImageGraphicAttribute
的哈希码。在类 java.awt.font.GraphicAttribute 中声明的方法
getAlignment, getJustificationInfo, getOutline
-
构造方法详细信息
-
ImageGraphicAttribute
从指定的Image
构造一个ImageGraphicAttribute
。原点位于 (0, 0)。- 参数:
image
- 由这个ImageGraphicAttribute
渲染的Image
。该对象保留对image
的引用。alignment
- 来自这个ImageGraphicAttribute
的路线之一
-
ImageGraphicAttribute
从指定的Image
构造一个ImageGraphicAttribute
。Image
中的点 (originX
,originY
) 出现在文本中ImageGraphicAttribute
的原点处。- 参数:
image
- 由这个ImageGraphicAttribute
渲染的Image
。该对象保留对image
的引用。alignment
- 来自这个ImageGraphicAttribute
的路线之一originX
-Image
中出现在文本行中ImageGraphicAttribute
原点处的点的 X 坐标。originY
-Image
中出现在文本行中ImageGraphicAttribute
原点处的点的 Y 坐标。
-
-
方法详情
-
getAscent
public float getAscent()返回此ImageGraphicAttribute
的上升。ImageGraphicAttribute
的上升是从图像顶部到原点的距离。- 指定者:
getAscent
在类GraphicAttribute
中- 返回:
-
这个
ImageGraphicAttribute
的上升。 - 参见:
-
getDescent
public float getDescent()返回此ImageGraphicAttribute
的血统。ImageGraphicAttribute
的下降是从原点到图像底部的距离。- 指定者:
getDescent
在类GraphicAttribute
中- 返回:
-
这个
ImageGraphicAttribute
的血统。 - 参见:
-
getAdvance
public float getAdvance()返回此ImageGraphicAttribute
的预付款。ImageGraphicAttribute
的前进是从原点到图像右边缘的距离。- 指定者:
getAdvance
在类GraphicAttribute
中- 返回:
-
这个
ImageGraphicAttribute
的进步。 - 参见:
-
getBounds
返回一个Rectangle2D
,它包含此ImageGraphicAttribute
相对于渲染位置渲染的所有位。图形可以在其起源、上升、下降或前进之外呈现;但如果是,则此方法的实现必须指明图形的呈现位置。- 重写:
getBounds
在类GraphicAttribute
中- 返回:
-
一个
Rectangle2D
包含了这个ImageGraphicAttribute
呈现的所有位。
-
draw
在指定位置呈现此GraphicAttribute
。- 指定者:
draw
在类GraphicAttribute
中- 参数:
graphics
- 渲染图形的Graphics2D
x
- 渲染图形的用户空间 X 坐标y
- 渲染图形的用户空间 Y 坐标
-
hashCode
public int hashCode()返回此ImageGraphicAttribute
的哈希码。 -
equals
将此ImageGraphicAttribute
与指定的Object
进行比较。 -
equals
将此ImageGraphicAttribute
与指定的ImageGraphicAttribute
进行比较。- 参数:
rhs
- 比较相等的ImageGraphicAttribute
- 返回:
true
如果这个ImageGraphicAttribute
等于rhs
;false
否则。
-