public interface Stroke
Stroke
接口允许
Graphics2D
对象获得
Shape
是装饰的轮廓,或文体表现的大纲、指定的
Shape
。抚摸着
Shape
就像用记号笔在适当的尺寸和形状跟踪其轮廓。该地区的笔将墨水用的轮廓
Shape
所包围的区域。
那用大纲Shape
的Graphics2D
接口的方法返回的对象包括Stroke
draw
和任何其他的方法,在该方法的实现,如drawLine
,drawRect
,drawRoundRect
,drawOval
,drawArc
,drawPolyline
,和drawPolygon
。
实施Stroke
类的对象必须是只读的,Graphics2D
不复制这些对象时设置为一个属性与setStroke
方法或当Graphics2D
对象本身是克隆。如果一个Stroke
对象后,设置在那么Graphics2D
语境后续的渲染行为会定义的修改。
Modifier and Type | Method and Description |
---|---|
Shape |
createStrokedShape(Shape p)
返回一个轮廓
Shape 包围的地区,应该画在
Shape 时根据对象实施
Stroke 接口定义的规则。
|
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.