- java.lang.Object
-
- java.awt.font.GraphicAttribute
-
- java.awt.font.ShapeGraphicAttribute
-
public final class ShapeGraphicAttribute extends GraphicAttribute
该ShapeGraphicAttribute类的实现GraphicAttribute绘制形状在TextLayout。- 另请参见:
-
GraphicAttribute
-
-
字段汇总
字段 变量和类型 字段 描述 static booleanFILL应填写表示形状的键。static booleanSTROKE表示形状的键应以1像素宽的笔划进行描边。-
声明的属性在类 java.awt.font.GraphicAttribute
BOTTOM_ALIGNMENT, CENTER_BASELINE, HANGING_BASELINE, ROMAN_BASELINE, TOP_ALIGNMENT
-
-
构造方法摘要
构造方法 构造器 描述 ShapeGraphicAttribute(Shape shape, int alignment, boolean stroke)构造一个ShapeGraphicAttribute指定的Shape。
-
方法摘要
所有方法 实例方法 具体的方法 变量和类型 方法 描述 booleanequals(ShapeGraphicAttribute rhs)将此ShapeGraphicAttribute与指定的ShapeGraphicAttribute。booleanequals(Object rhs)将此ShapeGraphicAttribute与指定的Object。floatgetAdvance()返回此ShapeGraphicAttribute。floatgetAscent()返回此ShapeGraphicAttribute的上升。Rectangle2DgetBounds()返回一个Rectangle2D,它包含此ShapeGraphicAttribute相对于渲染位置绘制的所有位。floatgetDescent()返回ShapeGraphicAttribute的下降。ShapegetOutline(AffineTransform tx)返回Shape,表示此ShapeGraphicAttribute呈现的区域。inthashCode()返回此ShapeGraphicAttribute的哈希ShapeGraphicAttribute。-
声明方法的类 java.awt.font.GraphicAttribute
draw, getAlignment, getJustificationInfo
-
-
-
-
构造方法详细信息
-
ShapeGraphicAttribute
public ShapeGraphicAttribute(Shape shape, int alignment, boolean stroke)
构造一个ShapeGraphicAttribute指定的Shape。- 参数
-
shape- 要渲染的Shape。Shape的原点位于主机TextLayout中此ShapeGraphicAttribute的TextLayout。 该对象维护对shape的引用。 -
alignment- 此ShapeGraphicAttribute一个对齐方式。 -
stroke-true如果Shape应该被抚摸;false如果应填写Shape。
-
-
方法详细信息
-
getAscent
public float getAscent()
返回此ShapeGraphicAttribute的上升。 一的上升ShapeGraphicAttribute从其起源的正距离Shape它的边界的顶部Shape。- Specified by:
-
getAscent类GraphicAttribute - 结果
-
这个
ShapeGraphicAttribute。 - 另请参见:
-
GraphicAttribute.getBounds()
-
getDescent
public float getDescent()
返回ShapeGraphicAttribute的下降。ShapeGraphicAttribute的下降是从其Shape的原点到其Shape的边界底部的Shape。- Specified by:
-
getDescent在类GraphicAttribute - 结果
-
这个
ShapeGraphicAttribute的血统。 - 另请参见:
-
GraphicAttribute.getBounds()
-
getAdvance
public float getAdvance()
返回此ShapeGraphicAttribute的前进。ShapeGraphicAttribute是从其Shape的原点到其Shape的边界的右侧的Shape。- Specified by:
-
getAdvance在课程GraphicAttribute - 结果
-
这个进展
ShapeGraphicAttribute。 - 另请参见:
-
GraphicAttribute.getBounds()
-
getBounds
public Rectangle2D getBounds()
返回一个Rectangle2D,它包含此ShapeGraphicAttribute相对于渲染位置绘制的所有位。 图形可以超出其原点,上升,下降或前进; 但如果确实如此,此方法的实现应指明图形的呈现位置。- 重写:
-
getBounds类GraphicAttribute - 结果
-
Rectangle2D,它包含此ShapeGraphicAttribute呈现的所有位。
-
getOutline
public Shape getOutline(AffineTransform tx)
返回Shape,表示此ShapeGraphicAttribute呈现的区域。 当请求TextLayout返回文本轮廓时使用此选项。 (未转换的)形状不得延伸到getBounds返回的矩形边界getBounds。- 重写:
-
getOutline在类GraphicAttribute - 参数
-
tx- 可选的AffineTransform申请这个ShapeGraphicAttribute。 这可以为null。 - 结果
-
表示此图形属性的
Shape,适用于抚摸或填充。 - 从以下版本开始:
- 1.6
-
hashCode
public int hashCode()
返回此ShapeGraphicAttribute的哈希ShapeGraphicAttribute。- 重写:
-
hashCode类Object - 结果
-
此
ShapeGraphicAttribute的哈希码值。 - 另请参见:
-
Object.equals(java.lang.Object),System.identityHashCode(java.lang.Object)
-
equals
public boolean equals(Object rhs)
将此ShapeGraphicAttribute与指定的Object。- 重写:
-
equals类Object - 参数
-
rhs- 比较平等的Object - 结果
-
true如果这ShapeGraphicAttribute等于rhs; 否则为false。 - 另请参见:
-
Object.hashCode(),HashMap
-
equals
public boolean equals(ShapeGraphicAttribute rhs)
将此ShapeGraphicAttribute与指定的ShapeGraphicAttribute。- 参数
-
rhs- 比较平等的ShapeGraphicAttribute - 结果
-
true如果这ShapeGraphicAttribute等于rhs; 否则为false。
-
-