Loading

PendShape

processing

The PendShape function is the companion to PbeginShape and may only be called after PbeginShape. When Pendshape is called, all of image data defined since the previous call to PbeginShape is written into the image buffer. The constant CLOSE as the value for the MODE parameter to close the shape (to connect the beginning and the end).

Up to Warp 10 1.2.18, PendShape could be called without the mode parameter. It defaults to OPEN.

Link to original Processing doc

PendShape is available since version 1.0.0.

See also

Signatures

Examples

// @preview image 100 200 '2D' PGraphics //new image instance 0 'y' STORE 0xffffffff Pbackground //white background 0xff0000ff Pstroke //blue stroke (ARGB color) 10 PtextSize 0xffff0000 Pfill //red fill 3 PstrokeWeight 'CENTER' PtextAlign 'POLYGON CLOSE' 50 $y 10 + Ptext 'POLYGON' PbeginShape 30 $y 20 + Pvertex 85 $y 20 + Pvertex 85 $y 75 + Pvertex 30 $y 75 + Pvertex 'CLOSE' PendShape $y 100 + 'y' STORE 'POLYGON OPEN' 50 $y 10 + Ptext PbeginShape //defaults to 'POLYGON' mode 30 $y 20 + Pvertex 85 $y 20 + Pvertex 85 $y 75 + Pvertex 30 $y 75 + Pvertex PendShape //defaults to 'OPEN' Pencode