Reference strokeCap()

strokeCap()

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

either ROUND, SQUARE, or PROJECT

Notice any errors or typos? Please let us know. Please feel free to edit src/core/shape/attributes.js and open a pull request!

Related References