- java.lang.Object
-
- java.awt.font.GraphicAttribute
-
- java.awt.font.ImageGraphicAttribute
-
public final class ImageGraphicAttribute extends GraphicAttribute
该ImageGraphicAttribute类的实现GraphicAttribute其中提请在图像TextLayout。- 另请参见:
-
GraphicAttribute
-
-
字段汇总
-
声明的属性在类 java.awt.font.GraphicAttribute
BOTTOM_ALIGNMENT, CENTER_BASELINE, HANGING_BASELINE, ROMAN_BASELINE, TOP_ALIGNMENT
-
-
构造方法摘要
构造方法 构造器 描述 ImageGraphicAttribute(Image image, int alignment)构造一个ImageGraphicAttribute从指定Image。ImageGraphicAttribute(Image image, int alignment, float originX, float originY)构造一个ImageGraphicAttribute从指定Image。
-
方法摘要
所有方法 实例方法 具体的方法 变量和类型 方法 描述 booleanequals(ImageGraphicAttribute rhs)将此ImageGraphicAttribute与指定的ImageGraphicAttribute。booleanequals(Object rhs)将此ImageGraphicAttribute与指定的Object进行比较 。floatgetAdvance()返回此ImageGraphicAttribute的前进。floatgetAscent()返回此ImageGraphicAttribute的上升。Rectangle2DgetBounds()返回一个Rectangle2D,它包含此ImageGraphicAttribute渲染的所有位,相对于渲染位置。floatgetDescent()返回ImageGraphicAttribute的下降。inthashCode()返回此ImageGraphicAttribute的哈希ImageGraphicAttribute。-
声明方法的类 java.awt.font.GraphicAttribute
draw, getAlignment, getJustificationInfo, getOutline
-
-
-
-
构造方法详细信息
-
ImageGraphicAttribute
public ImageGraphicAttribute(Image image, int alignment)
构造一个ImageGraphicAttribute从指定Image。 原点位于(0,0)。- 参数
-
image- 由此Image呈现的ImageGraphicAttribute。 该对象保留对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-Image中出现在文本行中ImageGraphicAttribute原点的点的X坐标。 -
originY-Image中出现在文本行中ImageGraphicAttribute原点的点的Y坐标。
-
-
方法详细信息
-
getAscent
public float getAscent()
返回此ImageGraphicAttribute的上升。ImageGraphicAttribute的上升是从图像顶部到原点的距离。- Specified by:
-
getAscent在课程GraphicAttribute - 结果
-
这个
ImageGraphicAttribute。 - 另请参见:
-
GraphicAttribute.getBounds()
-
getDescent
public float getDescent()
返回ImageGraphicAttribute的下降。ImageGraphicAttribute的下降是从图像的原点到底部的距离。- Specified by:
-
getDescent在类GraphicAttribute - 结果
-
这个
ImageGraphicAttribute的血统。 - 另请参见:
-
GraphicAttribute.getBounds()
-
getAdvance
public float getAdvance()
返回此ImageGraphicAttribute。ImageGraphicAttribute的前进是图像的原点到右边缘的距离。- Specified by:
-
getAdvance类GraphicAttribute - 结果
-
这个
ImageGraphicAttribute。 - 另请参见:
-
GraphicAttribute.getBounds()
-
getBounds
public Rectangle2D getBounds()
返回一个Rectangle2D,它包含此ImageGraphicAttribute渲染的所有位,相对于渲染位置。 图形可以超出其原点,上升,下降或前进; 但如果是,则此方法的实现必须指示图形的呈现位置。- 重写:
-
getBounds类GraphicAttribute - 结果
-
Rectangle2D,它包含此ImageGraphicAttribute呈现的所有位。
-
hashCode
public int hashCode()
返回此ImageGraphicAttribute的哈希ImageGraphicAttribute。- 重写:
-
hashCode,类Object - 结果
- 此对象的哈希码值。
- 另请参见:
-
Object.equals(java.lang.Object),System.identityHashCode(java.lang.Object)
-
equals
public boolean equals(Object rhs)
将此ImageGraphicAttribute与指定的Object进行比较 。- 重写:
-
equals类Object - 参数
-
rhs- 比较平等的Object - 结果
-
true若ImageGraphicAttribute等于rhs; 否则为false。 - 另请参见:
-
Object.hashCode(),HashMap
-
equals
public boolean equals(ImageGraphicAttribute rhs)
将此ImageGraphicAttribute与指定的ImageGraphicAttribute。- 参数
-
rhs- 比较平等的ImageGraphicAttribute - 结果
-
true如果这ImageGraphicAttribute等于rhs; 否则为false。
-
-