strokeCap() / Reference
Name
strokeCap()
Description
Sets the style for rendering line endings. These ends are either squared, extended, or rounded, each of which specified with the corresponding parameters: SQUARE, PROJECT, and ROUND. The default cap is ROUND.
To make point() appear square, use strokeCap(PROJECT). Using strokeCap(SQUARE) (no cap) causes points to become invisible.
Examples
size(400, 400); strokeWeight(48.0); strokeCap(ROUND); line(80, 120, 320, 120); strokeCap(SQUARE); line(80, 200, 320, 200); strokeCap(PROJECT); line(80, 280, 320, 280);
Parameters
cap(int)either SQUARE, PROJECT, or ROUND
