by, 03-06-2012 at 09:01 PM (477 Views)
Stroke attributes define the line style in Graphic2D rendering context. BasicStroke object shall be created and passed to Graphic2D setStroke method so that to set the stroke attribute.
Information in a BasicStroke object is:
- Line width
- Join style
- End cap style
- Dash style
Use this information when shape is rendered with draw method.
The line width is line thickness which is measured perpendicular, to its trajectory. The line width is specified, as in user coordinate units a float value that is equals to 1/72 of an inch, when we use the default transform.
The join style is considered as the decoration applied when 2 line segments meet.