public final class ShapeGraphicAttribute extends GraphicAttribute
GraphicAttribute
| Modifier and Type | Field and Description |
|---|---|
static boolean |
FILL
应填写一个指示形状的键。
|
static boolean |
STROKE
一个关键的指示的形状应该是用一个像素宽的行程。
|
BOTTOM_ALIGNMENT, CENTER_BASELINE, HANGING_BASELINE, ROMAN_BASELINE, TOP_ALIGNMENT| Constructor and Description |
|---|
ShapeGraphicAttribute(Shape shape, int alignment, boolean stroke)
构建了一个指定的
Shape
ShapeGraphicAttribute。
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(Graphics2D graphics, float x, float y)
使得这
GraphicAttribute在指定位置。
|
boolean |
equals(Object rhs)
比较这
ShapeGraphicAttribute到指定的
Object。
|
boolean |
equals(ShapeGraphicAttribute rhs)
比较这
ShapeGraphicAttribute到指定的
ShapeGraphicAttribute。
|
float |
getAdvance()
返回该
ShapeGraphicAttribute前进。
|
float |
getAscent()
返回该
ShapeGraphicAttribute上升。
|
Rectangle2D |
getBounds()
返回一个
Rectangle2D包围所有的位,这
ShapeGraphicAttribute相对位置绘制渲染。
|
float |
getDescent()
返回该
ShapeGraphicAttribute下降。
|
Shape |
getOutline(AffineTransform tx)
返回一个
Shape代表区域,这
ShapeGraphicAttribute呈现。
|
int |
hashCode()
返回该
ShapeGraphicAttribute hashCode。
|
getAlignment, getJustificationInfopublic static final boolean STROKE
public static final boolean FILL
public ShapeGraphicAttribute(Shape shape, int alignment, boolean stroke)
Shape
ShapeGraphicAttribute。
shape -
Shape渲染。的
Shape呈现在主机
TextLayout这
ShapeGraphicAttribute起源起源。这个对象维护一个引用
shape。
alignment -这个
ShapeGraphicAttribute路线。
stroke -
true如果
Shape应该抚摸;
false如果
Shape应填。
public float getAscent()
ShapeGraphicAttribute上升。一个
ShapeGraphicAttribute上升是其
Shape的起源到其
Shape界顶正距离。
getAscent 方法重写,继承类
GraphicAttribute
ShapeGraphicAttribute上升。
GraphicAttribute.getBounds()
public float getDescent()
ShapeGraphicAttribute下降。一个
ShapeGraphicAttribute下降是其
Shape的起源到其
Shape界底部的距离。
getDescent 方法重写,继承类
GraphicAttribute
ShapeGraphicAttribute下降。
GraphicAttribute.getBounds()
public float getAdvance()
ShapeGraphicAttribute前进。一
ShapeGraphicAttribute提前从它的
Shape的起源到其
Shape范围右边的距离。
getAdvance 方法重写,继承类
GraphicAttribute
ShapeGraphicAttribute前进。
GraphicAttribute.getBounds()
public void draw(Graphics2D graphics, float x, float y)
GraphicAttribute在指定位置。
draw 方法重写,继承类
GraphicAttribute
graphics -
Graphics2D,渲染图形
x -用户空间X坐标,图形渲染
y -用户空间Y坐标,图形渲染
public Rectangle2D getBounds()
Rectangle2D包围所有的位,这
ShapeGraphicAttribute相对位置绘制渲染。一个图形可以超越它的起源,上升,下降,或提前,但如果它,这种方法的实施应表明图形渲染。
getBounds 方法重写,继承类
GraphicAttribute
Rectangle2D包围所有的比特被这
ShapeGraphicAttribute。
public Shape getOutline(AffineTransform tx)
getOutline 方法重写,继承类
GraphicAttribute
tx -适用于这
ShapeGraphicAttribute可选
AffineTransform。这可以为空。
Shape,适合描边或填充。
public int hashCode()
ShapeGraphicAttribute hashCode。
hashCode 方法重写,继承类
Object
ShapeGraphicAttribute哈希代码值。
Object.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)
public boolean equals(Object rhs)
ShapeGraphicAttribute到指定的
Object。
equals 方法重写,继承类
Object
rhs -
Object比较平等
true
ShapeGraphicAttribute等于
rhs;
false否则。
Object.hashCode(),
HashMap
public boolean equals(ShapeGraphicAttribute rhs)
ShapeGraphicAttribute到指定的
ShapeGraphicAttribute。
rhs -
ShapeGraphicAttribute比较平等
true
ShapeGraphicAttribute等于
rhs;
false否则。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.