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, getJustificationInfo
public 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.