mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Implemented curveVertex() in PShape
This commit is contained in:
@@ -1363,17 +1363,39 @@ public class PShape implements PConstants {
|
||||
public void curveDetail(int detail) {
|
||||
}
|
||||
|
||||
|
||||
public void curveTightness(float tightness) {
|
||||
}
|
||||
|
||||
|
||||
public void curveVertex(float x, float y) {
|
||||
if (vertices == null) {
|
||||
vertices = new float[10][];
|
||||
} else if (vertexCount >= vertices.length) {
|
||||
vertices = (float[][]) PApplet.expand(vertices);
|
||||
}
|
||||
vertices[vertexCount++] = new float[] { x, y };
|
||||
|
||||
if (vertexCodes == null) {
|
||||
vertexCodes = new int[10];
|
||||
} else if (vertexCodes.length == vertexCodeCount) {
|
||||
vertexCodes = PApplet.expand(vertexCodes);
|
||||
}
|
||||
vertexCodes[vertexCodeCount++] = CURVE_VERTEX;
|
||||
|
||||
if (x > width) {
|
||||
width = x;
|
||||
}
|
||||
if (y > height) {
|
||||
height = y;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void curveVertex(float x, float y, float z) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user