diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 32bb3515b..2da3ccf8e 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -442,7 +442,7 @@ public class PApplet extends Applet * You may find that pmouseX and pmouseY have different * values inside draw() and inside events like mousePressed() * and mouseMoved(). This is because they're used for different - * roles, so don't mix them! Inside draw(), pmouseX and + * roles, so don't mix them. Inside draw(), pmouseX and * pmouseY update only once per frame (once per trip through your * draw()). But, inside mouse events, they update each time the * event is called. If they weren't separated, then the mouse would be read @@ -469,7 +469,7 @@ public class PApplet extends Applet * The system variable pmouseY always contains the vertical position * of the mouse in the frame previous to the current frame. More detailed * information about how pmouseY is updated inside of draw() - * and mouse events is explained in the reference for pmouseX. + * and mouse events is explained in the reference for pmouseX. * * ( end auto-generated ) * @webref input:mouse @@ -598,7 +598,7 @@ public class PApplet extends Applet * For users familiar with Java, the values for UP and DOWN are simply * shorter versions of Java's KeyEvent.VK_UP and KeyEvent.VK_DOWN. Other * keyCode values can be found in the Java KeyEvent reference. + * href="http://download.oracle.com/javase/6/docs/api/java/awt/event/KeyEvent.html">KeyEvent reference. * * ( end auto-generated ) * @@ -1283,8 +1283,8 @@ public class PApplet extends Applet *
* The P3D renderer doesn't support strokeCap() or strokeJoin(), which can * lead to ugly results when using strokeWeight(). (Bug 955) - *
+ * href="http://code.google.com/p/processing/issues/detail?id=123">Issue + * 123)
*
* The maximum width and height is limited by your operating system, and is * usually the width and height of your actual screen. On some machines it @@ -1378,21 +1378,20 @@ public class PApplet extends Applet * P3D. Use this class if you need to draw into an off-screen graphics * buffer. The PDF renderer requires the filename parameter. The DXF * renderer should not be used with createGraphics(), it's only - * built for use with beginRaw() and endRaw(). - *

+ * built for use with beginRaw() and endRaw().
+ *
* It's important to call any drawing functions between beginDraw() * and endDraw() statements. This is also true for any functions - * that affect drawing, such as smooth() or colorMode(). - *

- * Unlike the main drawing surface which is completely opaque, surfaces + * that affect drawing, such as smooth() or colorMode().
+ *
the main drawing surface which is completely opaque, surfaces * created with createGraphics() can have transparency. This makes * it possible to draw into a graphics and maintain the alpha channel. By * using save() to write a PNG or TGA file, the transparency of the * graphics object will be honored. Note that transparency levels are * binary: pixels are either complete opaque or transparent. For the time - * being (as of release 1.2.1), this means that text characters will be - * opaque blocks. This will be fixed in a future release (Issue 80). + * being, this means that text characters will be opaque blocks. This will + * be fixed in a future release (Issue 80). * * ( end auto-generated ) *

Advanced

@@ -3211,16 +3210,16 @@ public class PApplet extends Applet * sequences can be loaded into programs such as Apple's QuickTime software * and made into movies. These files are saved to the sketch's folder, * which may be opened by selecting "Show sketch folder" from the "Sketch" - * menu. - *

+ * menu.
+ *
* It is not possible to use saveXxxxx() methods inside a web browser - * unless the sketch is signed. - * To save a file back to a server, see the save to - * web example. - *

- *
images saved from the main drawing window will be opaque. To save + * unless the sketch is signed applet. To + * save a file back to a server, see the save to + * web code snippet on the Processing Wiki.
+ *
+ * All images saved from the main drawing window will be opaque. To save * images without a background, use createGraphics(). * * ( end auto-generated ) @@ -4560,26 +4559,23 @@ public class PApplet extends Applet * be loaded. To load correctly, images must be located in the data * directory of the current sketch. In most cases, load all images in * setup() to preload them at the start of the program. Loading - * images inside draw() will reduce the speed of a program. - *

- * The filename parameter can also be a URL to a file found online. - * For security reasons, a Processing sketch found online can only download - * files from the same server from which it came. Getting around this - * restriction requires a signed applet. - *

- * The extension parameter is used to determine the image type in + * images inside draw() will reduce the speed of a program.
+ *
filename parameter can also be a URL to a file found + * online. For security reasons, a Processing sketch found online can only + * download files from the same server from which it came. Getting around + * this restriction requires a signed + * applet.
+ *
extension parameter is used to determine the image type in * cases where the image filename does not end with a proper extension. * Specify the extension as the second parameter to loadImage(), as - * shown in the third example on this page. - *

- * If an image is not loaded successfully, the null value is + * shown in the third example on this page.
+ *
an image is not loaded successfully, the null value is * returned and an error message will be printed to the console. The error * message does not halt the program, however the null value may cause a * NullPointerException if your code does not check whether the value - * returned from loadImage() is null. - *

- * Depending on the type of error, a PImage object may still be + * returned from loadImage() is null.
+ *
on the type of error, a PImage object may still be * returned, but the width and height of the image will be set to -1. This * happens if bad image data is returned or cannot be decoded properly. * Sometimes this happens with image URLs that produce a 403 error or that @@ -5063,17 +5059,16 @@ public class PApplet extends Applet * only SVG files may be loaded. To load correctly, the file must be * located in the data directory of the current sketch. In most cases, * loadShape() should be used inside setup() because loading - * shapes inside draw() will reduce the speed of a sketch. - *

- * The filename parameter can also be a URL to a file found online. - * For security reasons, a Processing sketch found online can only download - * files from the same server from which it came. Getting around this - * restriction requires a signed applet. - *

- * If a shape is not loaded successfully, the null value is returned - * and an error message will be printed to the console. The error message - * does not halt the program, however the null value may cause a + * shapes inside draw() will reduce the speed of a sketch.
+ *
filename parameter can also be a URL to a file found + * online. For security reasons, a Processing sketch found online can only + * download files from the same server from which it came. Getting around + * this restriction requires a signed + * applet.
+ *
a shape is not loaded successfully, the null value is + * returned and an error message will be printed to the console. The error + * message does not halt the program, however the null value may cause a * NullPointerException if your code does not check whether the value * returned from loadShape() is null. * @@ -5698,28 +5693,28 @@ public class PApplet extends Applet * The method is useful if you want to use the facilities provided by * PApplet to easily open files from the data folder or from a URL, but * want an InputStream object so that you can use other Java methods to - * take more control of how the stream is read. - *

- * If the requested item doesn't exist, null is returned. - *

- * In earlier releases, this method was called openStream(). - *

- * If not online, this will also check to see if the user is asking for a - * file whose name isn't properly capitalized. If capitalization is - * different an error will be printed to the console. This helps prevent - * issues that appear when a sketch is exported to the web, where case - * sensitivity matters, as opposed to running from inside the Processing - * Development Environment on Windows or Mac OS, where case sensitivity is - * preserved but ignored. - *

+ * take more control of how the stream is read.
+ *
* The filename passed in can be:
- * - A URL, for instance openStream("http://processing.org/");
- * - A file in the sketch's data folder
- * - The full path to a file to be opened locally (when running as an application) - *

+ * - A URL, for instance openStream("http://processing.org/")
+ * - A file in the sketch's data folder
+ * - The full path to a file to be opened locally (when running as an + * application)
+ *
+ * If the requested item doesn't exist, null is returned. If not online, + * this will also check to see if the user is asking for a file whose name + * isn't properly capitalized. If capitalization is different, an error + * will be printed to the console. This helps prevent issues that appear + * when a sketch is exported to the web, where case sensitivity matters, as + * opposed to running from inside the Processing Development Environment on + * Windows or Mac OS, where case sensitivity is preserved but ignored.
+ *
* If the file ends with .gz, the stream will automatically be gzip * decompressed. If you don't want the automatic decompression, use the * related function createInputRaw(). + *
+ * In earlier releases, this function was called openStream().
+ *
* * ( end auto-generated ) * @@ -5968,13 +5963,14 @@ public class PApplet extends Applet * ( begin auto-generated from loadBytes.xml ) * * Reads the contents of a file or url and places it in a byte array. If a - * file is specified, it must be located in the sketch's "data" directory/folder. - *

+ * file is specified, it must be located in the sketch's "data" + * directory/folder.
+ *
* The filename parameter can also be a URL to a file found online. For * security reasons, a Processing sketch found online can only download * files from the same server from which it came. Getting around this - * restriction requires a signed applet. + * restriction requires a signed applet. * * ( end auto-generated ) * @webref input:files @@ -6034,14 +6030,14 @@ public class PApplet extends Applet * * Reads the contents of a file or url and creates a String array of its * individual lines. If a file is specified, it must be located in the - * sketch's "data" directory/folder. - *

+ * sketch's "data" directory/folder.
+ *
* The filename parameter can also be a URL to a file found online. For * security reasons, a Processing sketch found online can only download * files from the same server from which it came. Getting around this - * restriction requires a signed applet. - *

+ * restriction requires a signed applet. + *
* If the file is not available or an error occurs, null will be * returned and an error message will be printed to the console. The error * message does not halt the program, however the null value may cause a @@ -6271,15 +6267,14 @@ public class PApplet extends Applet * Opposite of loadBytes(), will write an entire array of bytes to a * file. The data is saved in binary format. This file is saved to the * sketch's folder, which is opened by selecting "Show sketch folder" from - * the "Sketch" menu. - *

- *

+ * the "Sketch" menu.
+ *
* It is not possible to use saveXxxxx() methods inside a web browser - * unless the sketch is signed. - * To save a file back to a server, see the save to - * web example. + * unless the sketch is signed applet. To + * save a file back to a server, see the save to + * web code snippet on the Processing Wiki. * * ( end auto-generated ) * @webref output:files @@ -6358,16 +6353,16 @@ public class PApplet extends Applet * * Writes an array of strings to a file, one line per string. This file is * saved to the sketch's folder, which is opened by selecting "Show sketch - * folder" from the "Sketch" menu. - *

+ * folder" from the "Sketch" menu.
+ *
* It is not possible to use saveXxxxx() methods inside a web browser - * unless the sketch is signed. - * To save a file back to a server, see the save to - * web example. - *

- * Starting with Processing release 0134, all files loaded and saved by the + * unless the sketch is signed applet. To + * save a file back to a server, see the save to + * web code snippet on the Processing Wiki.
+ *
+ * Starting with Processing 1.0, all files loaded and saved by the * Processing API use UTF-8 encoding. In previous releases, the default * encoding for your platform was used, which causes problems when files * are moved to other platforms. @@ -7553,8 +7548,8 @@ public class PApplet extends Applet * text, and return matching groups (elements found inside parentheses) as * a String array. No match will return null. If no groups are specified in * the regexp, but the sequence matches, an array of length one (with the - * matched text as the first element of the array) will be returned. - *

+ * matched text as the first element of the array) will be returned.
+ *
* To use the function, first check to see if the result is null. If the * result is null, then the sequence did not match. If the sequence did * match, an array is returned. @@ -7562,14 +7557,13 @@ public class PApplet extends Applet * then the contents of each will be returned in the array. * Element [0] of a regexp match returns the entire matching string, and * the match groups start at element [1] (the first group is [1], the - * second [2], and so on). - *

- * The syntax can be found in the reference for Java's Pattern - * class. For regular expression syntax, read the Java - * Tutorial on the topic. - *

+ * second [2], and so on).
+ *
+ * The syntax can be found in the reference for Java's Pattern class. + * For regular expression syntax, read the Java + * Tutorial on the topic. * * ( end auto-generated ) * @webref data:string_functions @@ -7599,28 +7593,28 @@ public class PApplet extends Applet /** * ( begin auto-generated from matchAll.xml ) * - * The matchAll() function is used to apply a regular expression to a piece - * of text, and return a list of matching groups (elements found inside - * parentheses) as a two-dimensional String array. No matches will return - * null. If no groups are specified in the regexp, but the sequence - * matches, a two dimensional array is still returned, but the second - * dimension is only of length one. - *

+ * This function is used to apply a regular expression to a piece of text, + * and return a list of matching groups (elements found inside parentheses) + * as a two-dimensional String array. No matches will return null. If no + * groups are specified in the regexp, but the sequence matches, a two + * dimensional array is still returned, but the second dimension is only of + * length one.
+ *
* To use the function, first check to see if the result is null. If the * result is null, then the sequence did not match at all. If the sequence - * did match, a 2D array is returned. - * If there are groups (specified by sets of parentheses) in the regexp, - * then the contents of each will be returned in the array. + * did match, a 2D array is returned. If there are groups (specified by + * sets of parentheses) in the regexp, then the contents of each will be + * returned in the array. * Assuming, a loop with counter variable i, element [i][0] of a regexp * match returns the entire matching string, and the match groups start at - * element [i][1] (the first group is [i][1], the second [i][2], and so on). - *

- * The syntax can be found in the reference for Java's Pattern - * class. For regular expression syntax, read the Java - * Tutorial on the topic. - *

+ * element [i][1] (the first group is [i][1], the second [i][2], and so + * on).
+ *
+ * The syntax can be found in the reference for Java's Pattern class. + * For regular expression syntax, read the Java + * Tutorial on the topic. * * ( end auto-generated ) * @webref data:string_functions @@ -9380,9 +9374,7 @@ public class PApplet extends Applet * ( begin auto-generated from endRaw.xml ) * * Complement to beginRaw(); they must always be used together. See - * the beginRaw() - * reference for details. + * the beginRaw() reference for details. * * ( end auto-generated ) * @webref output:files @@ -10327,8 +10319,8 @@ public class PApplet extends Applet * ( begin auto-generated from bezierTangent.xml ) * * Calculates the tangent of a point on a Bezier curve. There is a good - * definition of "tangent" at Wikipedia: http://en.wikipedia.org/wiki/Tangent + * definition of tangent on Wikipedia. * * ( end auto-generated ) *

Advanced

@@ -10467,9 +10459,9 @@ public class PApplet extends Applet /** * ( begin auto-generated from curveTangent.xml ) * - * Calculates the tangent of a point on a curve. There is a good definition - * of "tangent" at Wikipedia: http://en.wikipedia.org/wiki/Tangent + * Calculates the tangent of a point on a curve. There's a good definition + * of tangent on Wikipedia. * * ( end auto-generated ) * @@ -11724,7 +11716,8 @@ public class PApplet extends Applet /** * ( begin auto-generated from printMatrix.xml ) * - * Prints the current matrix to the text window. + * Prints the current matrix to the Console (the text window at the bottom + * of Processing). * * ( end auto-generated ) * @webref transform @@ -11837,7 +11830,8 @@ public class PApplet extends Applet /** * ( begin auto-generated from printCamera.xml ) * - * Prints the current camera matrix to the text window. + * Prints the current camera matrix to the Console (the text window at the + * bottom of Processing). * * ( end auto-generated ) * @webref lights_camera:camera @@ -11960,7 +11954,8 @@ public class PApplet extends Applet /** * ( begin auto-generated from printProjection.xml ) * - * Prints the current projection matrix to the text window. + * Prints the current projection matrix to the Console (the text window at + * the bottom of Processing). * * ( end auto-generated ) * @webref lights_camera:camera @@ -12191,8 +12186,8 @@ public class PApplet extends Applet * When drawing with P3D, series of connected lines (such as the stroke * around a polygon, triangle, or ellipse) produce unattractive results * when a thick stroke weight is set (see bug - * report). With P3D, the minimum and maximum values for + * href="http://code.google.com/p/processing/issues/detail?id=123">see + * Issue 123). With P3D, the minimum and maximum values for * strokeWeight() are controlled by the graphics card and the * operating system's OpenGL implementation. For instance, the thickness * may not go higher than 10 pixels. @@ -12219,8 +12214,8 @@ public class PApplet extends Applet * MITER. *

* This function is not available with the P3D renderer, (see bug - * report). More information about the renderers can be found in the + * href="http://code.google.com/p/processing/issues/detail?id=123">see + * Issue 123). More information about the renderers can be found in the * size() reference. * * ( end auto-generated ) @@ -12244,8 +12239,8 @@ public class PApplet extends Applet * parameters SQUARE, PROJECT, and ROUND. The default cap is ROUND. *

* This function is not available with the P3D renderer (see bug - * report). More information about the renderers can be found in the + * href="http://code.google.com/p/processing/issues/detail?id=123">see + * Issue 123). More information about the renderers can be found in the * size() reference. * * ( end auto-generated ) diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index 59fea829b..db4b8d11f 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -37,8 +37,8 @@ import java.util.HashMap; * constructed with the createGraphics() function. The * beginDraw() and endDraw() methods (see above example) are * necessary to set up the buffer and to finalize it. The fields and - * methods for this class are extensive; for a complete list visit the - * developer's reference: http://dev.processing.org/reference/core/ + * methods for this class are extensive. For a complete list, visit the developer's reference. * * ( end auto-generated ) * @@ -2494,8 +2494,8 @@ public class PGraphics extends PImage implements PConstants { * ( begin auto-generated from bezierTangent.xml ) * * Calculates the tangent of a point on a Bezier curve. There is a good - * definition of "tangent" at Wikipedia: http://en.wikipedia.org/wiki/Tangent + * definition of tangent on Wikipedia. * * ( end auto-generated ) *

Advanced

@@ -2683,9 +2683,9 @@ public class PGraphics extends PImage implements PConstants { /** * ( begin auto-generated from curveTangent.xml ) * - * Calculates the tangent of a point on a curve. There is a good definition - * of "tangent" at Wikipedia: http://en.wikipedia.org/wiki/Tangent + * Calculates the tangent of a point on a curve. There's a good definition + * of tangent on Wikipedia. * * ( end auto-generated ) * @@ -4748,7 +4748,8 @@ public class PGraphics extends PImage implements PConstants { /** * ( begin auto-generated from printMatrix.xml ) * - * Prints the current matrix to the text window. + * Prints the current matrix to the Console (the text window at the bottom + * of Processing). * * ( end auto-generated ) * @webref transform @@ -4856,7 +4857,8 @@ public class PGraphics extends PImage implements PConstants { /** * ( begin auto-generated from printCamera.xml ) * - * Prints the current camera matrix to the text window. + * Prints the current camera matrix to the Console (the text window at the + * bottom of Processing). * * ( end auto-generated ) * @webref lights_camera:camera @@ -4971,7 +4973,8 @@ public class PGraphics extends PImage implements PConstants { /** * ( begin auto-generated from printProjection.xml ) * - * Prints the current projection matrix to the text window. + * Prints the current projection matrix to the Console (the text window at + * the bottom of Processing). * * ( end auto-generated ) * @webref lights_camera:camera @@ -5356,8 +5359,8 @@ public class PGraphics extends PImage implements PConstants { * When drawing with P3D, series of connected lines (such as the stroke * around a polygon, triangle, or ellipse) produce unattractive results * when a thick stroke weight is set (see bug - * report). With P3D, the minimum and maximum values for + * href="http://code.google.com/p/processing/issues/detail?id=123">see + * Issue 123). With P3D, the minimum and maximum values for * strokeWeight() are controlled by the graphics card and the * operating system's OpenGL implementation. For instance, the thickness * may not go higher than 10 pixels. @@ -5382,8 +5385,8 @@ public class PGraphics extends PImage implements PConstants { * MITER. *

* This function is not available with the P3D renderer, (see bug - * report). More information about the renderers can be found in the + * href="http://code.google.com/p/processing/issues/detail?id=123">see + * Issue 123). More information about the renderers can be found in the * size() reference. * * ( end auto-generated ) @@ -5405,8 +5408,8 @@ public class PGraphics extends PImage implements PConstants { * parameters SQUARE, PROJECT, and ROUND. The default cap is ROUND. *

* This function is not available with the P3D renderer (see bug - * report). More information about the renderers can be found in the + * href="http://code.google.com/p/processing/issues/detail?id=123">see + * Issue 123). More information about the renderers can be found in the * size() reference. * * ( end auto-generated ) diff --git a/core/src/processing/core/PVector.java b/core/src/processing/core/PVector.java index 22935c7ea..56f89441c 100644 --- a/core/src/processing/core/PVector.java +++ b/core/src/processing/core/PVector.java @@ -43,11 +43,12 @@ import processing.core.PConstants; * velocity changes per time unit, expressed as a vector). Since vectors * represent groupings of values, we cannot simply use traditional * addition/multiplication/etc. Instead, we'll need to do some "vector" - * math, which is made easy by the methods inside the PVector class. - *

- * There are additional methods and other ways to use some of these methods - * revealed in the source code. + * math, which is made easy by the methods inside the PVector + * class.
+ *
+ * The methods for this class are extensive. For a complete list, visit the + * developer's reference. * * ( end auto-generated ) *