diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index 39a0c72b5..fec886787 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -8,7 +8,24 @@ are exported, and a number of other bug fixes and tweaks. [ about those changes ] ++ Serial on Mac OS X is currently only available for 32-bit. Hoping to have + a 64-bit version sometime soon. ++ Change to how dataPath() and dataFile() work. This is an undocumented + function, but for those using it, here's the skinny: + + dataPath() is only available with applications, not applets or Android. + On Windows and Linux, this is simply the data folder, which is located + in the same directory as the EXE file and lib folders. On Mac OS X, this + is a path to the data folder buried inside Contents/Resources/Java. + For the latter point, that also means that the data folder should not be + considered writable. Use sketchPath() for now, or inputPath() and + outputPath() once they're available in the 2.0 release. + + dataPath() is not supported with applets because applets have their data + folder wrapped into the JAR file. To read data from the data folder that + works with an applet, you should use other methods such as createInput(), + createReader(), or loadStrings(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index d13e103f7..0fed6ec2c 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -998,7 +998,7 @@ public class PApplet extends Applet } //// check for RuntimeException, and allow to bubble up if (t instanceof RuntimeException) { - //// re-throw exception + //// re-throw exception throw (RuntimeException) t; } else { //// trap and print as usual @@ -6532,38 +6532,29 @@ public class PApplet extends Applet /** * Return a full path to an item in the data folder. *
- * In this method, the data path is defined not as the applet's actual - * data path, but a folder titled "data" in the sketch's working - * directory. When running inside the PDE, this will be the sketch's - * "data" folder. However, when exported (as application or applet), - * sketch's data folder is exported as part of the applications jar file, - * and it's not possible to read/write from the jar file in a generic way. - * If you need to read data from the jar file, you should use other methods - * such as createInput(), createReader(), or loadStrings(). + * This is only available with applications, not applets or Android. + * On Windows and Linux, this is simply the data folder, which is located + * in the same directory as the EXE file and lib folders. On Mac OS X, this + * is a path to the data folder buried inside Contents/Resources/Java. + * For the latter point, that also means that the data folder should not be + * considered writable. Use sketchPath() for now, or inputPath() and + * outputPath() once they're available in the 2.0 release. + *
+ * dataPath() is not supported with applets because applets have their data + * folder wrapped into the JAR file. To read data from the data folder that + * works with an applet, you should use other methods such as createInput(), + * createReader(), or loadStrings(). */ public String dataPath(String where) { - // isAbsolute() could throw an access exception, but so will writing - // to the local disk using the sketch path, so this is safe here. - if (new File(where).isAbsolute()) return where; - - return sketchPath + File.separator + "data" + File.separator + where; + return dataFile(where).getAbsolutePath(); } - - + + /** * Return a full path to an item in the data folder as a File object. * See the dataPath() method for more information. */ public File dataFile(String where) { - return new File(dataPath(where)); - } - - - /** - * On Windows and Linux, this is simply the data folder. On Mac OS X, this is - * the path to the data folder buried inside Contents/Resources/Java - */ - public File inputFile(String where) { // isAbsolute() could throw an access exception, but so will writing // to the local disk using the sketch path, so this is safe here. File why = new File(where); @@ -6574,15 +6565,22 @@ public class PApplet extends Applet File containingFolder = new File(jarPath).getParentFile(); File dataFolder = new File(containingFolder, "data"); return new File(dataFolder, where); - } + } // Windows, Linux, or when not using a Mac OS X .app file return new File(sketchPath + File.separator + "data" + File.separator + where); } - - - public String inputPath(String where) { - return inputFile(where).getAbsolutePath(); - } + + + /** + * On Windows and Linux, this is simply the data folder. On Mac OS X, this is + * the path to the data folder buried inside Contents/Resources/Java + */ +// public File inputFile(String where) { +// } + + +// public String inputPath(String where) { +// } /** @@ -10014,15 +10012,15 @@ public class PApplet extends Applet /** * ( begin auto-generated from line.xml ) - * - * Draws a line (a direct path between two points) to the screen. The - * version of line() with four parameters draws the line in 2D. To - * color a line, use the stroke() function. A line cannot be filled, - * therefore the fill() function will not affect the color of a - * line. 2D lines are drawn with a width of one pixel by default, but this - * can be changed with the strokeWeight() function. The version with - * six parameters allows the line to be placed anywhere within XYZ space. - * Drawing this shape in 3D with the z parameter requires the P3D + * + * Draws a line (a direct path between two points) to the screen. The + * version of line() with four parameters draws the line in 2D. To + * color a line, use the stroke() function. A line cannot be filled, + * therefore the fill() function will not affect the color of a + * line. 2D lines are drawn with a width of one pixel by default, but this + * can be changed with the strokeWeight() function. The version with + * six parameters allows the line to be placed anywhere within XYZ space. + * Drawing this shape in 3D with the z parameter requires the P3D * parameter in combination with size() as shown in the above example. * * ( end auto-generated ) @@ -10144,7 +10142,7 @@ public class PApplet extends Applet * rectMode() function. * * ( end auto-generated ) - * + * * @webref shape:2d_primitives * @param a x-coordinate of the rectangle by default * @param b y-coordinate of the rectangle by default @@ -10183,16 +10181,16 @@ public class PApplet extends Applet /** * ( begin auto-generated from ellipseMode.xml ) - * - * The origin of the ellipse is modified by the ellipseMode() - * function. The default configuration is ellipseMode(CENTER), which - * specifies the location of the ellipse as the center of the shape. The - * RADIUS mode is the same, but the width and height parameters to - * ellipse() specify the radius of the ellipse, rather than the - * diameter. The CORNER mode draws the shape from the upper-left - * corner of its bounding box. The CORNERS mode uses the four - * parameters to ellipse() to set two opposing corners of the - * ellipse's bounding box. The parameter must be written in ALL CAPS + * + * The origin of the ellipse is modified by the ellipseMode() + * function. The default configuration is ellipseMode(CENTER), which + * specifies the location of the ellipse as the center of the shape. The + * RADIUS mode is the same, but the width and height parameters to + * ellipse() specify the radius of the ellipse, rather than the + * diameter. The CORNER mode draws the shape from the upper-left + * corner of its bounding box. The CORNERS mode uses the four + * parameters to ellipse() to set two opposing corners of the + * ellipse's bounding box. The parameter must be written in ALL CAPS * because Processing is a case-sensitive language. * * ( end auto-generated ) @@ -10301,7 +10299,7 @@ public class PApplet extends Applet * with two parameters. * * ( end auto-generated ) - * + * *
* Implementation notes: @@ -10374,7 +10372,7 @@ public class PApplet extends Applet * at t. * * ( end auto-generated ) - * + * *
* stroke(255, 102, 0);
@@ -10419,7 +10417,7 @@ public class PApplet extends Applet
* target="new">tangent on Wikipedia.
*
* ( end auto-generated )
- *
+ *
* Advanced
* Code submitted by Dave Bollinger (davol) for release 0136.
*
@@ -10446,7 +10444,7 @@ public class PApplet extends Applet
* P2D renderer does not use this information.
*
* ( end auto-generated )
- *
+ *
* @webref shape:curves
* @param detail resolution of the curves
* @see PGraphics#curve(float, float, float, float, float, float, float, float, float, float, float, float)
@@ -10480,7 +10478,7 @@ public class PApplet extends Applet
* Environment reference for more information).
*
* ( end auto-generated )
- *
+ *
* Advanced
* Draw a cubic bezier curve. The first and last points are
* the on-curve points. The middle two are the 'control' points,
@@ -10591,7 +10589,7 @@ public class PApplet extends Applet
* P2D renderer does not use this information.
*
* ( end auto-generated )
- *
+ *
* @webref shape:curves
* @param detail resolution of the curves
* @see PGraphics#curve(float, float, float, float, float, float, float, float, float, float, float, float)
@@ -10616,7 +10614,7 @@ public class PApplet extends Applet
* recognizable and as values increase in magnitude, they will continue to deform.
*
* ( end auto-generated )
- *
+ *
* @webref shape:curves
* @param tightness amount of deformation from the original vertices
* @see PGraphics#curve(float, float, float, float, float, float, float, float, float, float, float, float)
@@ -10704,7 +10702,7 @@ public class PApplet extends Applet
* smoothing altogether.
*
* ( end auto-generated )
- *
+ *
* @webref shape:attributes
* @see PGraphics#noSmooth()
* @see PGraphics#hint(int)
@@ -10748,7 +10746,7 @@ public class PApplet extends Applet
* Processing is a case-sensitive language.
*
* ( end auto-generated )
- *
+ *
* @webref image:loading_displaying
* @param mode either CORNER, CORNERS, or CENTER
* @see PApplet#loadImage(String, String)
@@ -10789,7 +10787,7 @@ public class PApplet extends Applet
* This function will maintain transparency for GIF and PNG images.
*
* ( end auto-generated )
- *
+ *
* Advanced
* Starting with release 0124, when using the default (JAVA2D) renderer,
* smooth() will also improve image quality of resized images.
@@ -10844,7 +10842,7 @@ public class PApplet extends Applet
* Processing is a case sensitive language.
*
* ( end auto-generated )
- *
+ *
* @webref shape:loading_displaying
* @param mode either CORNER, CORNERS, CENTER
* @see PGraphics#shape(PShape)
@@ -10890,7 +10888,7 @@ public class PApplet extends Applet
* yet support shapes that have holes or complicated breaks.
*
* ( end auto-generated )
- *
+ *
* @webref shape:loading_displaying
* @param shape the shape to display
* @param x x-coordinate of the shape
@@ -10942,7 +10940,7 @@ public class PApplet extends Applet
* if you change the size of the font.
*
* ( end auto-generated )
- *
+ *
* @webref typography:attributes
* @param alignX horizontal alignment, either LEFT, CENTER, or RIGHT
* @param alignY vertical alignment, either TOP, BOTTOM, CENTER, or BASELINE
@@ -10965,7 +10963,7 @@ public class PApplet extends Applet
* will give you the total height of the line.
*
* ( end auto-generated )
- *
+ *
* @webref typography:metrics
* @see PGraphics#textDescent()
*/
@@ -10983,7 +10981,7 @@ public class PApplet extends Applet
* textDescent() values will give you the total height of the line.
*
* ( end auto-generated )
- *
+ *
* @webref typography:metrics
* @see PGraphics#textAscent()
*/
@@ -11042,7 +11040,7 @@ public class PApplet extends Applet
* will be used in all subsequent calls to the text() function.
*
* ( end auto-generated )
- *
+ *
* @webref typography:attributes
* @param leading the size in pixels for spacing between lines
* @see PApplet#loadFont(String)
@@ -11058,23 +11056,23 @@ public class PApplet extends Applet
/**
* ( begin auto-generated from textMode.xml )
- *
- * Sets the way text draws to the screen. In the default configuration, the
- * MODEL mode, it's possible to rotate, scale, and place letters in
+ *
+ * Sets the way text draws to the screen. In the default configuration, the
+ * MODEL mode, it's possible to rotate, scale, and place letters in
* two and three dimensional space.
*
- * The SHAPE mode draws text using the the glyph outlines of
- * individual characters rather than as textures. This mode is only
- * supported with the PDF and P3D renderer settings. With the
- * PDF renderer, you must call textMode(SHAPE) before any
- * other drawing occurs. If the outlines are not available, then
- * textMode(SHAPE) will be ignored and textMode(MODEL) will
+ * The SHAPE mode draws text using the the glyph outlines of
+ * individual characters rather than as textures. This mode is only
+ * supported with the PDF and P3D renderer settings. With the
+ * PDF renderer, you must call textMode(SHAPE) before any
+ * other drawing occurs. If the outlines are not available, then
+ * textMode(SHAPE) will be ignored and textMode(MODEL) will
* be used instead.
*
- * The textMode(SHAPE) option in P3D can be combined with
- * beginRaw() to write vector-accurate text to 2D and 3D output
- * files, for instance DXF or PDF. The SHAPE mode is
- * not currently optimized for P3D, so if recording shape data, use
+ * The textMode(SHAPE) option in P3D can be combined with
+ * beginRaw() to write vector-accurate text to 2D and 3D output
+ * files, for instance DXF or PDF. The SHAPE mode is
+ * not currently optimized for P3D, so if recording shape data, use
* textMode(MODEL) until you're ready to capture the geometry with beginRaw().
*
* ( end auto-generated )
@@ -11101,7 +11099,7 @@ public class PApplet extends Applet
* calls to the text() function. Font size is measured in units of pixels.
*
* ( end auto-generated )
- *
+ *
* @webref typography:attributes
* @param size the size of the letters in units of pixels
* @see PApplet#loadFont(String)
@@ -11324,18 +11322,18 @@ public class PApplet extends Applet
/**
* ( begin auto-generated from pushMatrix.xml )
- *
- * Pushes the current transformation matrix onto the matrix stack.
- * Understanding pushMatrix() and popMatrix() requires
- * understanding the concept of a matrix stack. The pushMatrix()
- * function saves the current coordinate system to the stack and
- * popMatrix() restores the prior coordinate system.
- * pushMatrix() and popMatrix() are used in conjuction with
- * the other transformation functions and may be embedded to control the
+ *
+ * Pushes the current transformation matrix onto the matrix stack.
+ * Understanding pushMatrix() and popMatrix() requires
+ * understanding the concept of a matrix stack. The pushMatrix()
+ * function saves the current coordinate system to the stack and
+ * popMatrix() restores the prior coordinate system.
+ * pushMatrix() and popMatrix() are used in conjuction with
+ * the other transformation functions and may be embedded to control the
* scope of the transformations.
*
* ( end auto-generated )
- *
+ *
* @webref transform
* @see PGraphics#popMatrix()
* @see PGraphics#translate(float, float, float)
@@ -11352,17 +11350,17 @@ public class PApplet extends Applet
/**
* ( begin auto-generated from popMatrix.xml )
- *
- * Pops the current transformation matrix off the matrix stack.
- * Understanding pushing and popping requires understanding the concept of
- * a matrix stack. The pushMatrix() function saves the current
- * coordinate system to the stack and popMatrix() restores the prior
- * coordinate system. pushMatrix() and popMatrix() are used
- * in conjuction with the other transformation functions and may be
+ *
+ * Pops the current transformation matrix off the matrix stack.
+ * Understanding pushing and popping requires understanding the concept of
+ * a matrix stack. The pushMatrix() function saves the current
+ * coordinate system to the stack and popMatrix() restores the prior
+ * coordinate system. pushMatrix() and popMatrix() are used
+ * in conjuction with the other transformation functions and may be
* embedded to control the scope of the transformations.
*
* ( end auto-generated )
- *
+ *
* @webref transform
* @see PGraphics#pushMatrix()
*/
@@ -11389,7 +11387,7 @@ public class PApplet extends Applet
* further controlled by the pushMatrix() and popMatrix().
*
* ( end auto-generated )
- *
+ *
* @webref transform
* @param tx left/right translation
* @param ty up/down translation
@@ -11436,7 +11434,7 @@ public class PApplet extends Applet
* the pushMatrix() and popMatrix().
*
* ( end auto-generated )
- *
+ *
* @webref transform
* @param angle angle of rotation specified in radians
* @see PGraphics#popMatrix()
@@ -11470,7 +11468,7 @@ public class PApplet extends Applet
* as shown in the example above.
*
* ( end auto-generated )
- *
+ *
* @webref transform
* @param angle angle of rotation specified in radians
* @see PGraphics#popMatrix()
@@ -11504,7 +11502,7 @@ public class PApplet extends Applet
* as shown in the examples above.
*
* ( end auto-generated )
- *
+ *
* @webref transform
* @param angle angle of rotation specified in radians
* @see PGraphics#popMatrix()
@@ -11538,7 +11536,7 @@ public class PApplet extends Applet
* as shown in the examples above.
*
* ( end auto-generated )
- *
+ *
* @webref transform
* @param angle angle of rotation specified in radians
* @see PGraphics#popMatrix()
@@ -11558,9 +11556,9 @@ public class PApplet extends Applet
/**
* Advanced
* Rotate about a vector in space. Same as the glRotatef() function.
- * @param vx
- * @param vy
- * @param vz
+ * @param vx
+ * @param vy
+ * @param vz
*/
public void rotate(float angle, float vx, float vy, float vz) {
if (recorder != null) recorder.rotate(angle, vx, vy, vz);
@@ -11585,7 +11583,7 @@ public class PApplet extends Applet
* can be further controlled by pushMatrix() and popMatrix().
*
* ( end auto-generated )
- *
+ *
* @webref transform
* @param s percentage to scale the object
* @see PGraphics#popMatrix()
@@ -11648,7 +11646,7 @@ public class PApplet extends Applet
* the pushMatrix() and popMatrix() functions.
*
* ( end auto-generated )
- *
+ *
* @webref transform
* @param angle angle of shear specified in radians
* @see PGraphics#popMatrix()
@@ -11683,7 +11681,7 @@ public class PApplet extends Applet
* the pushMatrix() and popMatrix() functions.
*
* ( end auto-generated )
- *
+ *
* @webref transform
* @param angle angle of shear specified in radians
* @see PGraphics#popMatrix()
@@ -11706,7 +11704,7 @@ public class PApplet extends Applet
* function in OpenGL is glLoadIdentity().
*
* ( end auto-generated )
- *
+ *
* @webref transform
* @see PGraphics#pushMatrix()
* @see PGraphics#popMatrix()
@@ -11728,7 +11726,7 @@ public class PApplet extends Applet
* function in OpenGL is glMultMatrix().
*
* ( end auto-generated )
- *
+ *
* @webref transform
* @source
* @see PGraphics#pushMatrix()
@@ -11846,7 +11844,7 @@ public class PApplet extends Applet
* of Processing).
*
* ( end auto-generated )
- *
+ *
* @webref transform
* @see PGraphics#pushMatrix()
* @see PGraphics#popMatrix()
@@ -11880,7 +11878,7 @@ public class PApplet extends Applet
* endCamera() cannot be nested.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:camera
* @see PGraphics#camera()
* @see PGraphics#endCamera()
@@ -11903,7 +11901,7 @@ public class PApplet extends Applet
* beginCamera() for a description of how the functions are used.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:camera
* @see PGraphics#camera(float, float, float, float, float, float, float, float, float)
*/
@@ -11915,19 +11913,19 @@ public class PApplet extends Applet
/**
* ( begin auto-generated from camera.xml )
- *
- * Sets the position of the camera through setting the eye position, the
- * center of the scene, and which axis is facing upward. Moving the eye
- * position and the direction it is pointing (the center of the scene)
- * allows the images to be seen from different angles. The version without
- * any parameters sets the camera to the default position, pointing to the
- * center of the display window with the Y axis as up. The default values
- * are camera(width/2.0, height/2.0, (height/2.0) / tan(PI*30.0 /
- * 180.0), width/2.0, height/2.0, 0, 0, 1, 0). This function is similar
+ *
+ * Sets the position of the camera through setting the eye position, the
+ * center of the scene, and which axis is facing upward. Moving the eye
+ * position and the direction it is pointing (the center of the scene)
+ * allows the images to be seen from different angles. The version without
+ * any parameters sets the camera to the default position, pointing to the
+ * center of the display window with the Y axis as up. The default values
+ * are camera(width/2.0, height/2.0, (height/2.0) / tan(PI*30.0 /
+ * 180.0), width/2.0, height/2.0, 0, 0, 1, 0). This function is similar
* to gluLookAt() in OpenGL, but it first clears the current camera settings.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:camera
* @see PGraphics#endCamera()
* @see PGraphics#frustum(float, float, float, float, float, float)
@@ -11986,7 +11984,7 @@ public class PApplet extends Applet
* -10, 10).
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:camera
*/
public void ortho() {
@@ -12035,7 +12033,7 @@ public class PApplet extends Applet
* cameraZ*10.0) where cameraZ is ((height/2.0) / tan(PI*60.0/360.0));
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:camera
*/
public void perspective() {
@@ -12064,7 +12062,7 @@ public class PApplet extends Applet
* than muliplying itself with it.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:camera
* @param left left coordinate of the clipping plane
* @param right right coordinate of the clipping plane
@@ -12091,7 +12089,7 @@ public class PApplet extends Applet
* the bottom of Processing).
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:camera
* @see PGraphics#camera(float, float, float, float, float, float, float, float, float)
*/
@@ -12108,7 +12106,7 @@ public class PApplet extends Applet
* where it will appear on a (two-dimensional) screen.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:coordinates
* @param x 3D x-coordinate to be mapped
* @param y 3D y-coordinate to be mapped
@@ -12127,7 +12125,7 @@ public class PApplet extends Applet
* where it will appear on a (two-dimensional) screen.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:coordinates
* @param x 3D x-coordinate to be mapped
* @param y 3D y-coordinate to be mapped
@@ -12162,7 +12160,7 @@ public class PApplet extends Applet
* where it will appear on a (two-dimensional) screen.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:coordinates
* @param x 3D x-coordinate to be mapped
* @param y 3D y-coordinate to be mapped
@@ -12184,15 +12182,15 @@ public class PApplet extends Applet
* to place an object in space relative to the location of the original
* point once the transformations are no longer in use.
*
- * In the example, the modelX(), modelY(), and
- * modelZ() functions record the location of a box in space after
- * being placed using a series of translate and rotate commands. After
- * popMatrix() is called, those transformations no longer apply, but the
- * (x, y, z) coordinate returned by the model functions is used to place
+ * In the example, the modelX(), modelY(), and
+ * modelZ() functions record the location of a box in space after
+ * being placed using a series of translate and rotate commands. After
+ * popMatrix() is called, those transformations no longer apply, but the
+ * (x, y, z) coordinate returned by the model functions is used to place
* another box in the same location.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:coordinates
* @param x 3D x-coordinate to be mapped
* @param y 3D y-coordinate to be mapped
@@ -12207,22 +12205,22 @@ public class PApplet extends Applet
/**
* ( begin auto-generated from modelY.xml )
- *
- * Returns the three-dimensional X, Y, Z position in model space. This
- * returns the Y value for a given coordinate based on the current set of
- * transformations (scale, rotate, translate, etc.) The Y value can be used
- * to place an object in space relative to the location of the original
- * point once the transformations are no longer in use.
+ *
+ * Returns the three-dimensional X, Y, Z position in model space. This
+ * returns the Y value for a given coordinate based on the current set of
+ * transformations (scale, rotate, translate, etc.) The Y value can be used
+ * to place an object in space relative to the location of the original
+ * point once the transformations are no longer in use.
*
- * In the example, the modelX(), modelY(), and
- * modelZ() functions record the location of a box in space after
- * being placed using a series of translate and rotate commands. After
- * popMatrix() is called, those transformations no longer apply, but the
- * (x, y, z) coordinate returned by the model functions is used to place
+ * In the example, the modelX(), modelY(), and
+ * modelZ() functions record the location of a box in space after
+ * being placed using a series of translate and rotate commands. After
+ * popMatrix() is called, those transformations no longer apply, but the
+ * (x, y, z) coordinate returned by the model functions is used to place
* another box in the same location.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:coordinates
* @param x 3D x-coordinate to be mapped
* @param y 3D y-coordinate to be mapped
@@ -12237,22 +12235,22 @@ public class PApplet extends Applet
/**
* ( begin auto-generated from modelZ.xml )
- *
- * Returns the three-dimensional X, Y, Z position in model space. This
- * returns the Z value for a given coordinate based on the current set of
- * transformations (scale, rotate, translate, etc.) The Z value can be used
- * to place an object in space relative to the location of the original
+ *
+ * Returns the three-dimensional X, Y, Z position in model space. This
+ * returns the Z value for a given coordinate based on the current set of
+ * transformations (scale, rotate, translate, etc.) The Z value can be used
+ * to place an object in space relative to the location of the original
* point once the transformations are no longer in use.
*
- * In the example, the modelX(), modelY(), and
- * modelZ() functions record the location of a box in space after
- * being placed using a series of translate and rotate commands. After
- * popMatrix() is called, those transformations no longer apply, but the
- * (x, y, z) coordinate returned by the model functions is used to place
+ * In the example, the modelX(), modelY(), and
+ * modelZ() functions record the location of a box in space after
+ * being placed using a series of translate and rotate commands. After
+ * popMatrix() is called, those transformations no longer apply, but the
+ * (x, y, z) coordinate returned by the model functions is used to place
* another box in the same location.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:coordinates
* @param x 3D x-coordinate to be mapped
* @param y 3D y-coordinate to be mapped
@@ -12284,7 +12282,7 @@ public class PApplet extends Applet
* emissive(), specular(), shininess(), ambient()
*
* ( end auto-generated )
- *
+ *
* @webref structure
* @see PGraphics#popStyle()
*/
@@ -12306,7 +12304,7 @@ public class PApplet extends Applet
* provide more control (see the second example above for a demonstration.)
*
* ( end auto-generated )
- *
+ *
* @webref structure
* @see PGraphics#pushStyle()
*/
@@ -12338,7 +12336,7 @@ public class PApplet extends Applet
* may not go higher than 10 pixels.
*
* ( end auto-generated )
- *
+ *
* @webref shape:attributes
* @param weight the weight (in pixels) of the stroke
* @see PGraphics#stroke(int, float)
@@ -12365,7 +12363,7 @@ public class PApplet extends Applet
* size() reference.
*
* ( end auto-generated )
- *
+ *
* @webref shape:attributes
* @param join either MITER, BEVEL, ROUND
* @see PGraphics#stroke(int, float)
@@ -12443,7 +12441,7 @@ public class PApplet extends Applet
* maximum value is 255.
*
* ( end auto-generated )
- *
+ *
* @param rgb color value in hexadecimal notation
* @see PGraphics#noStroke()
* @see PGraphics#fill(int, float)
@@ -12506,7 +12504,7 @@ public class PApplet extends Applet
* displaying images with their original hues.
*
* ( end auto-generated )
- *
+ *
* @webref image:loading_displaying
* @usage web_application
* @see PGraphics#tint(float, float, float, float)
@@ -12522,30 +12520,30 @@ public class PApplet extends Applet
* ( begin auto-generated from tint.xml )
*
* Sets the fill value for displaying images. Images can be tinted to
- * specified colors or made transparent by setting the alpha.
+ * specified colors or made transparent by setting the alpha.
*
* To make an image transparent, but not change it's color, use white as
* the tint color and specify an alpha value. For instance, tint(255, 128)
- * will make an image 50% transparent (unless colorMode() has been
+ * will make an image 50% transparent (unless colorMode() has been
* used).
*
- * When using hexadecimal notation to specify a color, use "#" or "0x"
- * before the values (e.g. #CCFFAA, 0xFFCCFFAA). The # syntax uses six
- * digits to specify a color (the way colors are specified in HTML and
- * CSS). When using the hexadecimal notation starting with "0x", the
- * hexadecimal value must be specified with eight characters; the first two
- * characters define the alpha component and the remainder the red, green,
+ * When using hexadecimal notation to specify a color, use "#" or "0x"
+ * before the values (e.g. #CCFFAA, 0xFFCCFFAA). The # syntax uses six
+ * digits to specify a color (the way colors are specified in HTML and
+ * CSS). When using the hexadecimal notation starting with "0x", the
+ * hexadecimal value must be specified with eight characters; the first two
+ * characters define the alpha component and the remainder the red, green,
* and blue components.
*
* The value for the parameter "gray" must be less than or equal to the
* current maximum value as specified by colorMode(). The default
- * maximum value is 255.
+ * maximum value is 255.
*
- * The tint() function is also used to control the coloring of
- * textures in 3D.
- *
+ * The tint() function is also used to control the coloring of
+ * textures in 3D.
+ *
* ( end auto-generated )
- *
+ *
* @webref image:loading_displaying
* @usage web_application
* @param rgb color value in hexadecimal notation
@@ -12610,7 +12608,7 @@ public class PApplet extends Applet
* are called, nothing will be drawn to the screen.
*
* ( end auto-generated )
- *
+ *
* @webref color:setting
* @usage web_application
* @see PGraphics#fill(float, float, float, float)
@@ -12712,7 +12710,7 @@ public class PApplet extends Applet
* and shininess() in setting the material properties of shapes.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:material_properties
* @usage web_application
* @param rgb any value of the color datatype
@@ -12757,7 +12755,7 @@ public class PApplet extends Applet
* setting the material properties of shapes.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:material_properties
* @usage web_application
* @param rgb color to set
@@ -12799,7 +12797,7 @@ public class PApplet extends Applet
* setting the material properties of shapes.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:material_properties
* @usage web_application
* @param shine degree of shininess
@@ -12822,7 +12820,7 @@ public class PApplet extends Applet
* properties of shapes.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:material_properties
* @usage web_application
* @param rgb color to set
@@ -12868,7 +12866,7 @@ public class PApplet extends Applet
* through the loop.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:lights
* @usage web_application
* @see PGraphics#ambientLight(float, float, float, float, float, float)
@@ -12885,14 +12883,14 @@ public class PApplet extends Applet
/**
* ( begin auto-generated from noLights.xml )
- *
- * Disable all lighting. Lighting is turned off by default and enabled with
- * the lights() function. This function can be used to disable
- * lighting so that 2D geometry (which does not require lighting) can be
+ *
+ * Disable all lighting. Lighting is turned off by default and enabled with
+ * the lights() function. This function can be used to disable
+ * lighting so that 2D geometry (which does not require lighting) can be
* drawn after a set of lighted 3D geometry.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:lights
* @usage web_application
* @see PGraphics#lights()
@@ -12916,7 +12914,7 @@ public class PApplet extends Applet
* parameters is determined by the current color mode.
*
* ( end auto-generated )
- *
+ *
* @webref lights_camera:lights
* @usage web_application
* @param red red or hue value (depending on current color mode)
@@ -13139,7 +13137,7 @@ public class PApplet extends Applet
* the main drawing surface, however they will work properly with createGraphics().
*
* ( end auto-generated )
- *
+ *
* Advanced
* Clear the background with a color that includes an alpha value. This can
* only be used with objects created by createGraphics(), because the main
@@ -13319,7 +13317,7 @@ public class PApplet extends Applet
* & 0xFF;
*
* ( end auto-generated )
- *
+ *
* @webref color:creating_reading
* @usage web_application
* @param what any value of the color datatype
@@ -13349,7 +13347,7 @@ public class PApplet extends Applet
* myColor >> 8 & 0xFF;
*
* ( end auto-generated )
- *
+ *
* @webref color:creating_reading
* @usage web_application
* @param what any value of the color datatype
@@ -13379,7 +13377,7 @@ public class PApplet extends Applet
* & 0xFF;
*
* ( end auto-generated )
- *
+ *
* @webref color:creating_reading
* @usage web_application
* @param what any value of the color datatype
@@ -13440,7 +13438,7 @@ public class PApplet extends Applet
* Extracts the brightness value from a color.
*
* ( end auto-generated )
- *
+ *
* @webref color:creating_reading
* @usage web_application
* @param what any value of the color datatype
@@ -13464,7 +13462,7 @@ public class PApplet extends Applet
* point, 0.5 is half-way in between, etc.
*
* ( end auto-generated )
- *
+ *
* @webref color:creating_reading
* @usage web_application
* @param c1 interpolate from this color
@@ -13633,7 +13631,7 @@ public class PApplet extends Applet
* PGraphicsJava2D, or resized image data and OpenGL texture indices for
* PGraphicsOpenGL.
* @param renderer The PGraphics renderer associated to the image
- * @param storage The metadata required by the renderer
+ * @param storage The metadata required by the renderer
*/
public void setCache(PGraphics renderer, Object storage) {
if (recorder != null) recorder.setCache(renderer, storage);
@@ -13668,7 +13666,7 @@ public class PApplet extends Applet
* Store parameters for a renderer that requires extra metadata of
* some kind.
* @param renderer The PGraphics renderer associated to the image
- * @param storage The parameters required by the renderer
+ * @param storage The parameters required by the renderer
*/
public void setParams(PGraphics renderer, Object params) {
if (recorder != null) recorder.setParams(renderer, params);
@@ -13698,26 +13696,26 @@ public class PApplet extends Applet
/**
* ( begin auto-generated from PImage_get.xml )
- *
- * Reads the color of any pixel or grabs a section of an image. If no
- * parameters are specified, the entire image is returned. Use the x
- * and y parameters to get the value of one pixel. Get a section of
- * the display window by specifying an additional width and
- * height parameter. When getting an image, the x and
- * y parameters define the coordinates for the upper-left corner of
+ *
+ * Reads the color of any pixel or grabs a section of an image. If no
+ * parameters are specified, the entire image is returned. Use the x
+ * and y parameters to get the value of one pixel. Get a section of
+ * the display window by specifying an additional width and
+ * height parameter. When getting an image, the x and
+ * y parameters define the coordinates for the upper-left corner of
* the image, regardless of the current imageMode().