Py5Graphics.stroke_cap()

Sets the style for rendering line endings.

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 Py5Graphics.point() appear square, use stroke_cap(PROJECT). Using stroke_cap(SQUARE) (no cap) causes points to become invisible.

This method is the same as stroke_cap() but linked to a Py5Graphics object. To see example code for how it can be used, see stroke_cap().

Underlying Java method: PGraphics.strokeCap

Syntax

stroke_cap(cap: int, /) -> None

Parameters

  • cap: int - either SQUARE, PROJECT, or ROUND

Updated on September 11, 2021 16:51:34pm UTC