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.

Link to original Processing doc

PstrokeCap is available since version 1.0.0.

See also



// @preview image 100 100 '2D' PGraphics //new image instance, 100x100 pixels 0xffffffff Pbackground //white background 12 PstrokeWeight //stroke width 12pixels 0x7f0000ff Pstroke //blue stroke, half transparent (ARGB color) 'ROUND' PstrokeCap 20 30 80 30 Pline 'SQUARE' PstrokeCap 20 50 80 50 Pline 'PROJECT' PstrokeCap 20 70 80 70 Pline //draw thin red guidelines to illustrate 0x6fff0000 Pstroke 1 PstrokeWeight 20 0 20 100 Pline 80 0 80 100 Pline Pencode //render the image in a base64 format on the stack