The
BasicStroke
class defines a basic set of rendering
attributes for the outlines of graphics primitives, which are rendered
with a
Graphics2D
object that has its Stroke attribute set to
this
BasicStroke
.
The rendering attributes defined by
BasicStroke
describe
the shape of the mark made by a pen drawn along the outline of a
Shape
and the decorations applied at the ends and joins of
path segments of the
Shape
.
These rendering attributes include:
- width
- The pen width, measured perpendicularly to the pen trajectory.
- end caps
- The decoration applied to the ends of unclosed subpaths and
dash segments. Subpaths that start and end on the same point are
still considered unclosed if they do not have a CLOSE segment.
See
SEG_CLOSE
for more information on the CLOSE segment.
The three different decorations are: CAP_BUTT
,
CAP_ROUND
, and CAP_SQUARE
.
- line joins
- The decoration applied at the intersection of two path segments
and at the intersection of the endpoints of a subpath that is closed
using