mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
bounds check with setVertex(PVector) (fixes #2556)
This commit is contained in:
@@ -2065,7 +2065,12 @@ public class PShape implements PConstants {
|
||||
|
||||
vertices[index][X] = vec.x;
|
||||
vertices[index][Y] = vec.y;
|
||||
vertices[index][Z] = vec.z;
|
||||
|
||||
if (vertices[index].length > 2) {
|
||||
vertices[index][Z] = vec.z;
|
||||
} else if (vec.z != 0 && vec.z == vec.z) {
|
||||
throw new IllegalArgumentException("Cannot set a z-coordinate on a 2D shape");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ X https://github.com/processing/processing/issues/2228
|
||||
X https://github.com/processing/processing/pull/2324
|
||||
X move to native OS X full screen (gets rid of native code)
|
||||
X https://github.com/processing/processing/issues/2641
|
||||
X do bounds check on setVertex(PVector)
|
||||
X https://github.com/processing/processing/issues/2556
|
||||
|
||||
data
|
||||
X add copy() method to Table
|
||||
|
||||
Reference in New Issue
Block a user