Merge remote-tracking branch 'upstream/master'

This commit is contained in:
codeanticode
2014-11-16 10:29:01 -07:00
17 changed files with 251 additions and 46 deletions
+2
View File
@@ -20,6 +20,8 @@ We're removing `Applet` as the base class for `PApplet` and redoing the entire r
1. One downside is that you'll no longer be able to just drop a Processing sketch into other Java code, because `PApplet` will no longer subclass `Applet` (and therefore, `Component`). This is a huge downside for a tiny number of users. For the majority of users, re-read the "why" section. We'll try to figure out ways to continue embedding in other Java code, however, since we use this in our own work, and even within Processing itself (the Color Selector).
2. We're still determining how much code we're willing to break due to API changes. Stay tuned.
#### Retina/HiDPI/2x drawing and displays
* Documentation changes [here](https://github.com/processing/processing-docs/issues/170)
## The Mess
The rest of this document are my notes while I'm making changes.
@@ -530,7 +530,7 @@ public class PGraphicsJava2D extends PGraphics {
} else if (type == PShape.GEOMETRY) {
shape = new PShape(pg, PShape.GEOMETRY);
}
shape.is3D(false);
shape.set3D(false);
return shape;
}
@@ -601,7 +601,7 @@ public class PGraphicsJava2D extends PGraphics {
shape.setParams(p);
}
shape.is3D(false);
shape.set3D(false);
return shape;
}
+10 -1
View File
@@ -112,6 +112,9 @@ public class PShape implements PConstants {
public static final String NO_SUCH_VERTEX_ERROR =
"%1$s vertex index does not exist";
static public final String NO_VERTICES_ERROR =
"getVertexCount() only works with PATH or GEOMETRY shapes";
// boundary box of this shape
//protected float x;
//protected float y;
@@ -539,7 +542,7 @@ public class PShape implements PConstants {
}
public void is3D(boolean val) {
public void set3D(boolean val) {
is3D = val;
}
@@ -2051,6 +2054,9 @@ public class PShape implements PConstants {
* @see PShape#setVertex(int, float, float)
*/
public int getVertexCount() {
if (family == GROUP || family == PRIMITIVE) {
PGraphics.showWarning(NO_VERTICES_ERROR);
}
return vertexCount;
}
@@ -2100,6 +2106,7 @@ public class PShape implements PConstants {
return vertices[index][Z];
}
/**
* @webref pshape:method
* @brief Sets the vertex at the index position
@@ -2119,6 +2126,7 @@ public class PShape implements PConstants {
vertices[index][Y] = y;
}
/**
* @param z the z value for the vertex
*/
@@ -2133,6 +2141,7 @@ public class PShape implements PConstants {
vertices[index][Z] = z;
}
/**
* @param vec the PVector to define the x, y, z coordinates
*/
+2 -2
View File
@@ -308,7 +308,7 @@ public class PGraphics2D extends PGraphicsOpenGL {
} else if (type == PShape.GEOMETRY) {
shape = new PShapeOpenGL(pg, PShape.GEOMETRY);
}
shape.is3D(false);
shape.set3D(false);
return shape;
}
@@ -379,7 +379,7 @@ public class PGraphics2D extends PGraphicsOpenGL {
shape.setParams(p);
}
shape.is3D(false);
shape.set3D(false);
return shape;
}
+2 -2
View File
@@ -191,7 +191,7 @@ public class PGraphics3D extends PGraphicsOpenGL {
} else if (type == PShape.GEOMETRY) {
shape = new PShapeOpenGL(pg, PShape.GEOMETRY);
}
shape.is3D(true);
shape.set3D(true);
return shape;
}
@@ -272,7 +272,7 @@ public class PGraphics3D extends PGraphicsOpenGL {
shape.setParams(p);
}
shape.is3D(true);
shape.set3D(true);
return shape;
}
}
+4
View File
@@ -1,6 +1,10 @@
0232 core (3.0a5)
X detect CMYK JPEG images and return null
X https://community.oracle.com/thread/1272045?start=0&tstart=0
X show a warning when calling getVertexCount() on GROUP or PRIMITIVE shapes
X https://github.com/processing/processing/issues/2873
X https://github.com/processing/processing-docs/issues/167
X replace is3D(boolean) with set3D()
data
X fix XML.getString() with a default when no attrs are present at all