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。 -
方法总结
修饰符和类型方法描述voiddraw(Graphics2D graphics, float x, float y) 在指定位置呈现此GraphicAttribute。boolean将此ImageGraphicAttribute与指定的ImageGraphicAttribute进行比较。boolean将此ImageGraphicAttribute与指定的Object进行比较。float返回此ImageGraphicAttribute的预付款。float返回此ImageGraphicAttribute的上升。返回一个Rectangle2D,它包含此ImageGraphicAttribute相对于渲染位置渲染的所有位。float返回此ImageGraphicAttribute的血统。inthashCode()返回此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- 渲染图形的Graphics2Dx- 渲染图形的用户空间 X 坐标y- 渲染图形的用户空间 Y 坐标
-
hashCode
public int hashCode()返回此ImageGraphicAttribute的哈希码。 -
equals
将此ImageGraphicAttribute与指定的Object进行比较。 -
equals
将此ImageGraphicAttribute与指定的ImageGraphicAttribute进行比较。- 参数:
rhs- 比较相等的ImageGraphicAttribute- 返回:
true如果这个ImageGraphicAttribute等于rhs;false否则。
-