Loading

Pvertex


processing
Since v1.0.0
Available on all platforms
See also

All shapes are constructed by connecting a series of vertices. Pvertex is used to specify the vertex coordinates for points, lines, triangles, quads, and polygons. It is used exclusively within the PbeginShape and PendShape functions.

Link to original Processing doc

Signature

Examples

//see PbeginShape for more examples. // @preview image 100 400 '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 'POLYGON' PbeginShape 30 $y 20 + Pvertex 85 $y 20 + Pvertex 85 $y 75 + Pvertex 30 $y 75 + Pvertex 'OPEN' PendShape $y 100 + 'y' STORE 'POINTS' 50 $y 10 + Ptext 'POINTS' PbeginShape 30 $y 20 + Pvertex 85 $y 20 + Pvertex 85 $y 75 + Pvertex //0xff00ffff Pstroke //will make next point cyan 30 $y 75 + Pvertex 'OPEN' PendShape $y 100 + 'y' STORE 'LINES' 50 $y 10 + Ptext 'LINES' PbeginShape 30 $y 20 + Pvertex 85 $y 20 + Pvertex 85 $y 75 + Pvertex 30 $y 75 + Pvertex 'OPEN' PendShape Pencode