java.lang.Object
java.awt.font.GraphicAttribute
java.awt.font.ShapeGraphicAttribute
- 参见:
-
字段摘要
字段修饰符和类型Field描述static final boolean指示形状的键应被填充。static final boolean指示形状的键应使用 1 像素宽的笔划进行描边。在类 java.awt.font.GraphicAttribute 中声明的字段
BOTTOM_ALIGNMENT, CENTER_BASELINE, HANGING_BASELINE, ROMAN_BASELINE, TOP_ALIGNMENT -
构造方法总结
构造方法构造方法描述ShapeGraphicAttribute(Shape shape, int alignment, boolean stroke) 为指定的Shape构造一个ShapeGraphicAttribute。 -
方法总结
修饰符和类型方法描述voiddraw(Graphics2D graphics, float x, float y) 在指定位置呈现此GraphicAttribute。boolean将此ShapeGraphicAttribute与指定的ShapeGraphicAttribute进行比较。boolean将此ShapeGraphicAttribute与指定的Object进行比较。float返回此ShapeGraphicAttribute的预付款。float返回此ShapeGraphicAttribute的上升。返回一个Rectangle2D,它包含此ShapeGraphicAttribute相对于渲染位置绘制的所有位。float返回此ShapeGraphicAttribute的血统。返回代表此ShapeGraphicAttribute呈现的区域的Shape。inthashCode()返回此ShapeGraphicAttribute的哈希码。在类 java.awt.font.GraphicAttribute 中声明的方法
getAlignment, getJustificationInfo
-
字段详细信息
-
STROKE
public static final boolean STROKE指示形状的键应使用 1 像素宽的笔划进行描边。- 参见:
-
FILL
public static final boolean FILL指示形状的键应被填充。- 参见:
-
-
构造方法详细信息
-
ShapeGraphicAttribute
为指定的Shape构造一个ShapeGraphicAttribute。- 参数:
shape- 要渲染的Shape。Shape以其原点呈现在主机TextLayout中此ShapeGraphicAttribute的原点。该对象维护对shape的引用。alignment- 来自这个ShapeGraphicAttribute的路线之一。stroke-true如果Shape应该被抚摸;false如果Shape应该填写。
-
-
方法详情
-
getAscent
public float getAscent()返回此ShapeGraphicAttribute的上升。ShapeGraphicAttribute的上升是从其Shape的原点到其Shape的边界顶部的正距离。- 指定者:
getAscent在类GraphicAttribute中- 返回:
-
这个
ShapeGraphicAttribute的上升。 - 参见:
-
getDescent
public float getDescent()返回此ShapeGraphicAttribute的血统。ShapeGraphicAttribute的下降是从其Shape的原点到其Shape边界底部的距离。- 指定者:
getDescent在类GraphicAttribute中- 返回:
-
这个
ShapeGraphicAttribute的血统。 - 参见:
-
getAdvance
public float getAdvance()返回此ShapeGraphicAttribute的预付款。ShapeGraphicAttribute的前进是从其Shape的原点到其Shape边界右侧的距离。- 指定者:
getAdvance在类GraphicAttribute中- 返回:
-
这个
ShapeGraphicAttribute的进步。 - 参见:
-
draw
在指定位置呈现此GraphicAttribute。- 指定者:
draw在类GraphicAttribute中- 参数:
graphics- 渲染图形的Graphics2Dx- 渲染图形的用户空间 X 坐标y- 渲染图形的用户空间 Y 坐标
-
getBounds
返回一个Rectangle2D,它包含此ShapeGraphicAttribute相对于渲染位置绘制的所有位。图形可以在其起源、上升、下降或前进之外呈现;但如果是这样,此方法的实现应指示图形的呈现位置。- 重写:
getBounds在类GraphicAttribute中- 返回:
-
一个
Rectangle2D包含了这个ShapeGraphicAttribute呈现的所有位。
-
getOutline
返回代表此ShapeGraphicAttribute呈现的区域的Shape。这在请求TextLayout返回文本大纲时使用。 (未转换的)形状不得延伸到getBounds返回的矩形边界之外。- 重写:
getOutline在类GraphicAttribute中- 参数:
tx- 一个可选的AffineTransform应用到这个ShapeGraphicAttribute。这可以为空。- 返回:
Shape表示此图形属性,适用于描边或填充。- 自从:
- 1.6
-
hashCode
public int hashCode()返回此ShapeGraphicAttribute的哈希码。 -
equals
将此ShapeGraphicAttribute与指定的Object进行比较。 -
equals
将此ShapeGraphicAttribute与指定的ShapeGraphicAttribute进行比较。- 参数:
rhs- 要比较相等的ShapeGraphicAttribute- 返回:
true如果这个ShapeGraphicAttribute等于rhs;false否则。
-