Sets the style for rendering the ends of lines.
The caps for line endings are either rounded (ROUND
), squared (SQUARE
), or extended (PROJECT
). The default cap is ROUND
.
The argument passed to strokeCap()
must be written in ALL CAPS because the constants ROUND
, SQUARE
, and PROJECT
are defined this way. JavaScript is a case-sensitive language.
Examples
Syntax
strokeCap(cap)
Parameters
cap
Constant:
either ROUND, SQUARE, or PROJECT
This page is generated from the comments in src/core/shape/attributes.js . Please feel free to edit it and submit a pull request!