processing-website
processing-website copied to clipboard
beginShape() documentation lack LINE_STRIP shape mode
Issue description
Examples shown encourage users who wants to draw multiple consecutive line segments to use "With no mode specified, the shape can be any irregular polygon".
But the default POLYGON mode doesn't work if user supply only 2 vertices...
The example code is working with four vertices, but doesn't work anymore if you comment two of them !
URL(s) of affected page(s)
https://processing.org/reference/beginShape_.html
Proposed fix
The fourth example should use beginShape(LINE_STRIP) and LINE_STRIP should be mentionned in mode's list.
noFill();
beginShape(LINE_STRIP);
vertex(30, 20);
vertex(85, 20);
endShape();