( begin auto-generated from curveVertex.xml ) Specifies vertex coordinates for curves. This function may only be used between beginShape() and endShape() and only when there is no MODE parameter specified to beginShape() . The first and last points in a series of curveVertex(
(float x, float y)
| 2269 | * @see PGraphics#quadraticVertex(float, float, float, float, float, float) |
| 2270 | */ |
| 2271 | public void curveVertex(float x, float y) { |
| 2272 | curveVertexCheck(); |
| 2273 | float[] v = curveVertices[curveVertexCount]; |
| 2274 | v[X] = x; |
| 2275 | v[Y] = y; |
| 2276 | curveVertexCount++; |
| 2277 | |
| 2278 | // draw a segment if there are enough points |
| 2279 | if (curveVertexCount > 3) { |
| 2280 | curveVertexSegment(curveVertices[curveVertexCount-4][X], |
| 2281 | curveVertices[curveVertexCount-4][Y], |
| 2282 | curveVertices[curveVertexCount-3][X], |
| 2283 | curveVertices[curveVertexCount-3][Y], |
| 2284 | curveVertices[curveVertexCount-2][X], |
| 2285 | curveVertices[curveVertexCount-2][Y], |
| 2286 | curveVertices[curveVertexCount-1][X], |
| 2287 | curveVertices[curveVertexCount-1][Y]); |
| 2288 | } |
| 2289 | } |
| 2290 | |
| 2291 | /** |
| 2292 | * @param z the z-coordinate of the vertex |
no test coverage detected