public interface Stroke
Stroke接口允许一个Graphics2D对象获得一个Shape ,它是指定的883941818363636的装饰轮廓,或轮廓的风格Shape 。
Shape就像使用适当尺寸和形状的标记笔来追踪其轮廓。
笔会放置墨水的区域是由轮廓Shape包围的区域。
所述的方法Graphics2D接口使用轮廓Shape通过返回Stroke对象包括draw和被在该方法方面实现的任何其他方法,如drawLine , drawRect , drawRoundRect , drawOval , drawArc , drawPolyline和drawPolygon 。
实现类的对象Stroke必须只读的,因为Graphics2D并不克隆这些对象或者当它们被设置作为一个属性与所述setStroke方法或当Graphics2D对象本身进行克隆。 如果Stroke对象在Graphics2D上下文中设置后被修改,则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.