From db91449e33fd5af6ca598ebc1948c23e1757a3df Mon Sep 17 00:00:00 2001 From: Anadroid Date: Thu, 10 Sep 2020 13:51:11 +0200 Subject: [PATCH] Changed comments for all the web references in core --- core/src/processing/awt/PGraphicsJava2D.java | 36 +- core/src/processing/core/PConstants.java | 15 +- core/src/processing/core/PFont.java | 4 +- core/src/processing/core/PGraphics.java | 544 ++++++++++--------- core/src/processing/core/PImage.java | 60 +- core/src/processing/core/PShape.java | 139 +++-- core/src/processing/core/PVector.java | 101 +--- core/src/processing/data/FloatDict.java | 67 ++- core/src/processing/data/FloatList.java | 53 +- core/src/processing/data/IntDict.java | 37 +- core/src/processing/data/IntList.java | 39 +- core/src/processing/data/JSONArray.java | 40 +- core/src/processing/data/JSONObject.java | 35 +- core/src/processing/data/LongDict.java | 50 +- core/src/processing/data/LongList.java | 56 +- core/src/processing/data/StringDict.java | 41 +- core/src/processing/data/StringList.java | 33 +- core/src/processing/data/Table.java | 92 +++- core/src/processing/data/TableRow.java | 53 +- core/src/processing/data/XML.java | 84 ++- core/src/processing/opengl/PShader.java | 6 +- 21 files changed, 910 insertions(+), 675 deletions(-) diff --git a/core/src/processing/awt/PGraphicsJava2D.java b/core/src/processing/awt/PGraphicsJava2D.java index 264c12c72..4064c24f2 100644 --- a/core/src/processing/awt/PGraphicsJava2D.java +++ b/core/src/processing/awt/PGraphicsJava2D.java @@ -993,13 +993,43 @@ public class PGraphicsJava2D extends PGraphics { // BLEND /** - * ( begin auto-generated from blendMode.xml ) * - * This is a new reference entry for Processing 2.0. It will be updated shortly. + * Blends the pixels in the display window according to a defined mode. + * There is a choice of the following modes to blend the source pixels (A) + * with the ones of pixels already in the display window (B). Each pixel's + * final color is the result of applying one of the blend modes with each + * channel of (A) and (B) independently. The red channel is compared with + * red, green with green, and blue with blue.
+ *
+ * BLEND - linear interpolation of colors: C = A*factor + B. This is the default.
+ *
+ * ADD - additive blending with white clip: C = min(A*factor + B, 255)
+ *
+ * SUBTRACT - subtractive blending with black clip: C = max(B - A*factor, 0)
+ *
+ * DARKEST - only the darkest color succeeds: C = min(A*factor, B)
+ *
+ * LIGHTEST - only the lightest color succeeds: C = max(A*factor, B)
+ *
+ * DIFFERENCE - subtract colors from underlying image.
+ *
+ * EXCLUSION - similar to DIFFERENCE, but less extreme.
+ *
+ * MULTIPLY - multiply the colors, result will always be darker.
+ *
+ * SCREEN - opposite multiply, uses inverse values of the colors.
+ *
+ * REPLACE - the pixels entirely replace the others and don't utilize alpha (transparency) values
+ *
+ * We recommend using blendMode() and not the previous blend() + * function. However, unlike blend(), the blendMode() function + * does not support the following: HARD_LIGHT, SOFT_LIGHT, OVERLAY, DODGE, + * BURN. On older hardware, the LIGHTEST, DARKEST, and DIFFERENCE modes might + * not be available as well. * - * ( end auto-generated ) * * @webref Rendering + * @webBrief Blends the pixels in the display window according to a defined mode. * @param mode the blending mode to use */ @Override diff --git a/core/src/processing/core/PConstants.java b/core/src/processing/core/PConstants.java index a5eb0d8c7..d7069fb51 100644 --- a/core/src/processing/core/PConstants.java +++ b/core/src/processing/core/PConstants.java @@ -128,15 +128,14 @@ public interface PConstants { // useful goodness /** - * ( begin auto-generated from PI.xml ) * * PI is a mathematical constant with the value 3.14159265358979323846. It * is the ratio of the circumference of a circle to its diameter. It is * useful in combination with the trigonometric functions sin() and * cos(). * - * ( end auto-generated ) * @webref constants + * @webBrief PI is a mathematical constant with the value 3.14159265358979323846. * @see PConstants#TWO_PI * @see PConstants#TAU * @see PConstants#HALF_PI @@ -145,15 +144,14 @@ public interface PConstants { */ static final float PI = (float) Math.PI; /** - * ( begin auto-generated from HALF_PI.xml ) * * HALF_PI is a mathematical constant with the value * 1.57079632679489661923. It is half the ratio of the circumference of a * circle to its diameter. It is useful in combination with the * trigonometric functions sin() and cos(). * - * ( end auto-generated ) * @webref constants + * @webBrief HALF_PI is a mathematical constant with the value 1.57079632679489661923. * @see PConstants#PI * @see PConstants#TWO_PI * @see PConstants#TAU @@ -162,15 +160,14 @@ public interface PConstants { static final float HALF_PI = (float) (Math.PI / 2.0); static final float THIRD_PI = (float) (Math.PI / 3.0); /** - * ( begin auto-generated from QUARTER_PI.xml ) * * QUARTER_PI is a mathematical constant with the value 0.7853982. It is * one quarter the ratio of the circumference of a circle to its diameter. * It is useful in combination with the trigonometric functions * sin() and cos(). * - * ( end auto-generated ) * @webref constants + * @webBrief QUARTER_PI is a mathematical constant with the value 0.7853982. * @see PConstants#PI * @see PConstants#TWO_PI * @see PConstants#TAU @@ -178,15 +175,14 @@ public interface PConstants { */ static final float QUARTER_PI = (float) (Math.PI / 4.0); /** - * ( begin auto-generated from TWO_PI.xml ) * * TWO_PI is a mathematical constant with the value 6.28318530717958647693. * It is twice the ratio of the circumference of a circle to its diameter. * It is useful in combination with the trigonometric functions * sin() and cos(). * - * ( end auto-generated ) * @webref constants + * @webBrief TWO_PI is a mathematical constant with the value 6.28318530717958647693. * @see PConstants#PI * @see PConstants#TAU * @see PConstants#HALF_PI @@ -194,15 +190,14 @@ public interface PConstants { */ static final float TWO_PI = (float) (2.0 * Math.PI); /** - * ( begin auto-generated from TAU.xml ) * * TAU is an alias for TWO_PI, a mathematical constant with the value * 6.28318530717958647693. It is twice the ratio of the circumference * of a circle to its diameter. It is useful in combination with the * trigonometric functions sin() and cos(). * - * ( end auto-generated ) * @webref constants + * @webBrief An alias for TWO_PI * @see PConstants#PI * @see PConstants#TWO_PI * @see PConstants#HALF_PI diff --git a/core/src/processing/core/PFont.java b/core/src/processing/core/PFont.java index 8f0bffb7a..7add0b020 100644 --- a/core/src/processing/core/PFont.java +++ b/core/src/processing/core/PFont.java @@ -56,6 +56,7 @@ import java.util.HashMap; * ^^^^^^^^^^^^^^ setWidth (width displaced by char) * * @webref typography + * @webBrief Grayscale bitmap font class used by Processing. * @see PApplet#loadFont(String) * @see PApplet#createFont(String, float, boolean, char[]) * @see PGraphics#textFont(PFont) @@ -869,7 +870,6 @@ public class PFont implements PConstants { /** - * ( begin auto-generated from PFont_list.xml ) * * Gets a list of the fonts installed on the system. The data is returned * as a String array. This list provides the names of each font for input @@ -877,9 +877,9 @@ public class PFont implements PConstants { * fonts. This function is meant as a tool for programming local * applications and is not recommended for use in applets. * - * ( end auto-generated ) * * @webref pfont + * @webBrief Gets a list of the fonts installed on the system. * @usage application * @brief Gets a list of the fonts installed on the system */ diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index e9ce9bd60..58c00d089 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -50,7 +50,6 @@ import processing.opengl.PGL; import processing.opengl.PShader; /** - * ( begin auto-generated from PGraphics.xml ) * * Main graphics and rendering context, as well as the base API * implementation for processing "core". Use this class if you need to draw @@ -61,7 +60,6 @@ import processing.opengl.PShader; * methods for this class are extensive. For a complete list, visit the developer's reference. * - * ( end auto-generated ) * *

Advanced

* Main graphics and rendering context, as well as the base API implementation. @@ -146,6 +144,8 @@ import processing.opengl.PShader; * is generated from the javadoc comments. Yay. * * @webref rendering + * @webBrief Main graphics and rendering context, as well as the base API + * implementation for processing "core". * @instanceName graphics any object of the type PGraphics * @usage Web & Application * @see PApplet#createGraphics(int, int, String) @@ -888,35 +888,32 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from PGraphics_beginDraw.xml ) * * Sets the default properties for a PGraphics object. It should be called * before anything is drawn into the object. * - * ( end auto-generated ) *

Advanced

* When creating your own PGraphics, you should call this before * drawing anything. * * @webref pgraphics:method - * @brief Sets the default properties for a PGraphics object + * @webBrief Sets the default properties for a PGraphics object. */ public void beginDraw() { // ignore } /** - * ( begin auto-generated from PGraphics_endDraw.xml ) * * Finalizes the rendering of a PGraphics object so that it can be shown on screen. * - * ( end auto-generated ) *

Advanced

*

* When creating your own PGraphics, you should call this when * you're finished drawing. * * @webref pgraphics:method + * @webBrief Finalizes the rendering of a PGraphics object so that it can be shown on screen. * @brief Finalizes the rendering of a PGraphics object */ public void endDraw() { // ignore @@ -1083,7 +1080,6 @@ public class PGraphics extends PImage implements PConstants { // HINTS /** - * ( begin auto-generated from hint.xml ) * * Set various hints and hacks for the renderer. This is used to handle * obscure rendering features that cannot be implemented in a consistent @@ -1154,9 +1150,9 @@ public class PGraphics extends PImage implements PConstants { * prevents the double negatives, and also reinforces which hints can be * enabled or disabled. * - * ( end auto-generated ) * * @webref rendering + * @webBrief Set various hints and hacks for the renderer. * @param which name of the hint to be enabled or disabled * @see PGraphics * @see PApplet#createGraphics(int, int, String, String) @@ -1195,7 +1191,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from beginShape.xml ) * * Using the beginShape() and endShape() functions allow * creating more complex forms. beginShape() begins recording @@ -1222,8 +1217,9 @@ public class PGraphics extends PImage implements PConstants { * strokeJoin() cannot be changed while inside a * beginShape()/endShape() block with any renderer. * - * ( end auto-generated ) * @webref shape:vertex + * @webBrief Using the beginShape() and endShape() functions allow + * creating more complex forms. * @param kind Either POINTS, LINES, TRIANGLES, TRIANGLE_FAN, TRIANGLE_STRIP, QUADS, or QUAD_STRIP * @see PShape * @see PGraphics#endShape() @@ -1246,7 +1242,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from normal.xml ) * * Sets the current normal vector. This is for drawing three dimensional * shapes and surfaces and specifies a vector perpendicular to the surface @@ -1255,8 +1250,8 @@ public class PGraphics extends PImage implements PConstants { * imperfect, this is a better option when you want more control. This * function is identical to glNormal3f() in OpenGL. * - * ( end auto-generated ) * @webref lights_camera:lights + * @webBrief Sets the current normal vector. * @param nx x direction * @param ny y direction * @param nz z direction @@ -1314,7 +1309,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from textureMode.xml ) * * Sets the coordinate space for texture mapping. There are two options, * IMAGE, which refers to the actual coordinates of the image, and @@ -1324,8 +1318,8 @@ public class PGraphics extends PImage implements PConstants { * the points (0,0) (0,100) (100,200) (0,200). The same mapping in * NORMAL_SPACE is (0,0) (0,1) (1,1) (0,1). * - * ( end auto-generated ) * @webref image:textures + * @webBrief Sets the coordinate space for texture mapping. * @param mode either IMAGE or NORMAL * @see PGraphics#texture(PImage) * @see PGraphics#textureWrap(int) @@ -1338,13 +1332,14 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from textureWrap.xml ) * - * Description to come... + * Defines if textures repeat or draw once within a texture map. + * The two parameters are CLAMP (the default behavior) and REPEAT. + * This function only works with the P2D and P3D renderers. * - * ( end auto-generated from textureWrap.xml ) * * @webref image:textures + * @webBrief Defines if textures repeat or draw once within a texture map. * @param wrap Either CLAMP (default) or REPEAT * @see PGraphics#texture(PImage) * @see PGraphics#textureMode(int) @@ -1355,7 +1350,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from texture.xml ) * * Sets a texture to be applied to vertex points. The texture() * function must be called between beginShape() and @@ -1364,8 +1358,8 @@ public class PGraphics extends PImage implements PConstants { * When textures are in use, the fill color is ignored. Instead, use tint() * to specify the color of the texture as it is applied to the shape. * - * ( end auto-generated ) * @webref image:textures + * @webBrief Sets a texture to be applied to vertex points. * @param image reference to a PImage object * @see PGraphics#textureMode(int) * @see PGraphics#textureWrap(int) @@ -1602,7 +1596,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from vertex.xml ) * * All shapes are constructed by connecting a series of vertices. * vertex() is used to specify the vertex coordinates for points, @@ -1619,8 +1612,8 @@ public class PGraphics extends PImage implements PConstants { * v are specified in relation to the image's size in pixels, but * this relation can be changed with textureMode(). * - * ( end auto-generated ) * @webref shape:vertex + * @webBrief All shapes are constructed by connecting a series of vertices. * @param x x-coordinate of the vertex * @param y y-coordinate of the vertex * @param z z-coordinate of the vertex @@ -1690,7 +1683,22 @@ public class PGraphics extends PImage implements PConstants { // } /** + * Use the beginContour() and endContour() function to + * create negative shapes within shapes such as the center of the + * letter 'O'. beginContour() begins recording vertices for the + * shape and endContour() stops recording. The vertices that + * define a negative shape must "wind" in the opposite direction from + * the exterior shape. First draw vertices for the exterior shape in + * clockwise order, then for internal shapes, draw vertices counterclockwise.
+ *
+ * These functions can only be used within a beginShape()/endShape() + * pair and transformations such as translate(), rotate(), and + * scale() do not work within a beginContour()/endContour() + * pair. It is also not possible to use other shapes, such as ellipse() + * or rect() within. + * * @webref shape:vertex + * @webBrief Begins recording vertices for the shape. */ public void beginContour() { showMissingWarning("beginContour"); @@ -1698,7 +1706,23 @@ public class PGraphics extends PImage implements PConstants { /** + * Use the beginContour() and endContour() function to + * create negative shapes within shapes such as the center of the + * letter 'O'. beginContour() begins recording vertices for + * the shape and endContour() stops recording. The vertices + * that define a negative shape must "wind" in the opposite direction + * from the exterior shape. First draw vertices for the exterior shape + * in clockwise order, then for internal shapes, draw vertices counterclockwise.
+ *
+ * These functions can only be used within a beginShape()/endShape() + * pair and transformations such as translate(), rotate(), and + * scale() do not work within a beginContour()/endContour() + * pair. It is also not possible to use other shapes, such as ellipse() + * or rect() within. + * * @webref shape:vertex + * @webBrief Stops recording vertices for the shape. + */ */ public void endContour() { showMissingWarning("endContour"); @@ -1711,7 +1735,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from endShape.xml ) * * The endShape() function is the companion to beginShape() * and may only be called after beginShape(). When endshape() @@ -1720,8 +1743,8 @@ public class PGraphics extends PImage implements PConstants { * as the value for the MODE parameter to close the shape (to connect the * beginning and the end). * - * ( end auto-generated ) * @webref shape:vertex + * @webBrief the companion to beginShape() and may only be called after beginShape(). * @param mode use CLOSE to close the shape * @see PShape * @see PGraphics#beginShape(int) @@ -1737,7 +1760,25 @@ public class PGraphics extends PImage implements PConstants { /** + * Loads geometry into a variable of type PShape. SVG and OBJ + * 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.
+ *
+ * Alternatively, the file maybe be loaded from anywhere on the local + * computer using an absolute path (something that starts with / on + * Unix and Linux, or a drive letter on Windows), or the filename + * parameter can be a URL for a file found on a network.
+ *
+ * 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 NullPointerException if your code does not check whether + * the value returned is null.
+ * * @webref shape + * @webBrief Loads geometry into a variable of type PShape. * @param filename name of file to load, can be .svg or .obj * @see PShape * @see PApplet#createShape() @@ -1763,7 +1804,35 @@ public class PGraphics extends PImage implements PConstants { /** + * The createShape() function is used to define a new shape. + * Once created, this shape can be drawn with the shape() + * function. The basic way to use the function defines new primitive + * shapes. One of the following parameters are used as the first + * parameter: ELLIPSE, RECT, ARC, TRIANGLE, + * SPHERE, BOX, QUAD, or LINE. The + * parameters for each of these different shapes are the same as their + * corresponding functions: ellipse(), rect(), arc(), + * triangle(), sphere(), box(), quad(), and + * line(). The first example above clarifies how this works.
+ *
+ * Custom, unique shapes can be made by using createShape() without + * a parameter. After the shape is started, the drawing attributes and + * geometry can be set directly to the shape within the beginShape() + * and endShape() methods. See the second example above for specifics, + * and the reference for beginShape() for all of its options.
+ *
+ * The createShape() function can also be used to make a complex + * shape made of other shapes. This is called a "group" and it's created by + * using the parameter GROUP as the first parameter. See the fourth + * example above to see how it works.
+ *
+ * After using createShape(), stroke and fill color can be set by + * calling methods like setFill() and setStroke(), as seen + * in the examples above. The complete list of methods and fields for the + * PShape class are in the Processing Javadoc. + * * @webref shape + * @webBrief The createShape() function is used to define a new shape. * @see PShape * @see PShape#endShape() * @see PApplet#loadShape(String) @@ -1884,13 +1953,25 @@ public class PGraphics extends PImage implements PConstants { // SHADERS /** - * ( begin auto-generated from loadShader.xml ) + * Loads a shader into the PShader object. The shader file must be + * loaded in the sketch's "data" folder/directory to load correctly. + * Shaders are compatible with the P2D and P3D renderers, but not + * with the default renderer.
+ *
+ * Alternatively, the file maybe be loaded from anywhere on the local + * computer using an absolute path (something that starts with / on + * Unix and Linux, or a drive letter on Windows), or the filename + * parameter can be a URL for a file found on a network.
+ *
+ * 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 NullPointerException if your code does not check + * whether the value returned is null.
* - * This is a new reference entry for Processing 2.0. It will be updated shortly. - * - * ( end auto-generated ) * * @webref rendering:shaders + * @webBrief Loads a shader into the PShader object. * @param fragFilename name of fragment shader file */ public PShader loadShader(String fragFilename) { @@ -1909,13 +1990,13 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from shader.xml ) * - * This is a new reference entry for Processing 2.0. It will be updated shortly. + * Applies the shader specified by the parameters. It's compatible with + * the P2D and P3D renderers, but not with the default renderer. * - * ( end auto-generated ) * * @webref rendering:shaders + * @webBrief Applies the shader specified by the parameters. * @param shader name of shader file */ public void shader(PShader shader) { @@ -1932,13 +2013,13 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from resetShader.xml ) * - * This is a new reference entry for Processing 2.0. It will be updated shortly. + * Restores the default shaders. Code that runs after resetShader() + * will not be affected by previously defined shaders. * - * ( end auto-generated ) * * @webref rendering:shaders + * @webBrief Restores the default shaders. */ public void resetShader() { showMissingWarning("resetShader"); @@ -1967,15 +2048,15 @@ public class PGraphics extends PImage implements PConstants { // CLIPPING /** - * ( begin auto-generated from clip.xml ) * * Limits the rendering to the boundaries of a rectangle defined * by the parameters. The boundaries are drawn based on the state * of the imageMode() fuction, either CORNER, CORNERS, or CENTER. * - * ( end auto-generated ) * * @webref rendering + * @webBrief Limits the rendering to the boundaries of a rectangle defined + * by the parameters. * @param a x-coordinate of the rectangle, by default * @param b y-coordinate of the rectangle, by default * @param c width of the rectangle, by default @@ -2020,13 +2101,12 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from noClip.xml ) * * Disables the clipping previously started by the clip() function. * - * ( end auto-generated ) * * @webref rendering + * @webBrief Disables the clipping previously started by the clip() function. */ public void noClip() { showMissingWarning("noClip"); @@ -2039,13 +2119,43 @@ public class PGraphics extends PImage implements PConstants { // BLEND /** - * ( begin auto-generated from blendMode.xml ) * - * This is a new reference entry for Processing 2.0. It will be updated shortly. + * Blends the pixels in the display window according to a defined mode. + * There is a choice of the following modes to blend the source pixels (A) + * with the ones of pixels already in the display window (B). Each pixel's + * final color is the result of applying one of the blend modes with each + * channel of (A) and (B) independently. The red channel is compared with + * red, green with green, and blue with blue.
+ *
+ * BLEND - linear interpolation of colors: C = A*factor + B. This is the default.
+ *
+ * ADD - additive blending with white clip: C = min(A*factor + B, 255)
+ *
+ * SUBTRACT - subtractive blending with black clip: C = max(B - A*factor, 0)
+ *
+ * DARKEST - only the darkest color succeeds: C = min(A*factor, B)
+ *
+ * LIGHTEST - only the lightest color succeeds: C = max(A*factor, B)
+ *
+ * DIFFERENCE - subtract colors from underlying image.
+ *
+ * EXCLUSION - similar to DIFFERENCE, but less extreme.
+ *
+ * MULTIPLY - multiply the colors, result will always be darker.
+ *
+ * SCREEN - opposite multiply, uses inverse values of the colors.
+ *
+ * REPLACE - the pixels entirely replace the others and don't utilize alpha (transparency) values
+ *
+ * We recommend using blendMode() and not the previous blend() + * function. However, unlike blend(), the blendMode() function + * does not support the following: HARD_LIGHT, SOFT_LIGHT, OVERLAY, DODGE, + * BURN. On older hardware, the LIGHTEST, DARKEST, and DIFFERENCE modes might + * not be available as well. * - * ( end auto-generated ) * * @webref rendering + * @webBrief Blends the pixels in the display window according to a defined mode. * @param mode the blending mode to use */ public void blendMode(int mode) { @@ -2112,7 +2222,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from bezierVertex.xml ) * * Specifies vertex coordinates for Bezier curves. Each call to * bezierVertex() defines the position of two control points and one @@ -2125,8 +2234,8 @@ public class PGraphics extends PImage implements PConstants { * 3D version requires rendering with P3D (see the Environment reference * for more information). * - * ( end auto-generated ) * @webref shape:vertex + * @webBrief Specifies vertex coordinates for Bezier curves. * @param x2 the x-coordinate of the 1st control point * @param y2 the y-coordinate of the 1st control point * @param z2 the z-coordinate of the 1st control point @@ -2175,7 +2284,19 @@ public class PGraphics extends PImage implements PConstants { /** + * Specifies vertex coordinates for quadratic Bezier curves. Each call + * to quadraticVertex() defines the position of one control + * point and one anchor point of a Bezier curve, adding a new segment + * to a line or shape. The first time quadraticVertex() is used + * within a beginShape() call, it must be prefaced with a call + * to vertex() to set the first anchor point. This function must + * be used between beginShape() and endShape() and only + * when there is no MODE parameter specified to beginShape(). + * Using the 3D version requires rendering with P3D (see the Environment + * reference for more information). + * * @webref shape:vertex + * @webBrief Specifies vertex coordinates for quadratic Bezier curves. * @param cx the x-coordinate of the control point * @param cy the y-coordinate of the control point * @param x3 the x-coordinate of the anchor point @@ -2244,7 +2365,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from curveVertex.xml ) * * Specifies vertex coordinates for curves. This function may only be used * between beginShape() and endShape() and only when there is @@ -2258,9 +2378,9 @@ public class PGraphics extends PImage implements PConstants { * version requires rendering with P3D (see the Environment reference for * more information). * - * ( end auto-generated ) * * @webref shape:vertex + * @webBrief Specifies vertex coordinates for curves. * @param x the x-coordinate of the vertex * @param y the y-coordinate of the vertex * @see PGraphics#curve(float, float, float, float, float, float, float, float, float, float, float, float) @@ -2400,7 +2520,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from point.xml ) * * Draws a point, a coordinate in space at the dimension of one pixel. The * first parameter is the horizontal value for the point, the second value @@ -2409,9 +2528,9 @@ public class PGraphics extends PImage implements PConstants { * requires the P3D parameter in combination with size() as shown in * the above example. * - * ( end auto-generated ) * * @webref shape:2d_primitives + * @webBrief Draws a point, a coordinate in space at the dimension of one pixel. * @param x x-coordinate of the point * @param y y-coordinate of the point * @see PGraphics#stroke(int) @@ -2432,7 +2551,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( 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 @@ -2444,8 +2562,8 @@ public class PGraphics extends PImage implements PConstants { * 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 ) * @webref shape:2d_primitives + * @webBrief Draws a line (a direct path between two points) to the screen. * @param x1 x-coordinate of the first point * @param y1 y-coordinate of the first point * @param x2 x-coordinate of the second point @@ -2475,14 +2593,13 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from triangle.xml ) * * A triangle is a plane created by connecting three points. The first two * arguments specify the first point, the middle two arguments specify the * second point, and the last two arguments specify the third point. * - * ( end auto-generated ) * @webref shape:2d_primitives + * @webBrief A triangle is a plane created by connecting three points. * @param x1 x-coordinate of the first point * @param y1 y-coordinate of the first point * @param x2 x-coordinate of the second point @@ -2502,7 +2619,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from quad.xml ) * * A quad is a quadrilateral, a four sided polygon. It is similar to a * rectangle, but the angles between its edges are not constrained to @@ -2510,8 +2626,8 @@ public class PGraphics extends PImage implements PConstants { * vertex and the subsequent pairs should proceed clockwise or * counter-clockwise around the defined shape. * - * ( end auto-generated ) * @webref shape:2d_primitives + * @webBrief A quad is a quadrilateral, a four sided polygon. * @param x1 x-coordinate of the first corner * @param y1 y-coordinate of the first corner * @param x2 x-coordinate of the second corner @@ -2538,7 +2654,6 @@ public class PGraphics extends PImage implements PConstants { // RECT /** - * ( begin auto-generated from rectMode.xml ) * * Modifies the location from which rectangles draw. The default mode is * rectMode(CORNER), which specifies the location to be the upper @@ -2556,8 +2671,8 @@ public class PGraphics extends PImage implements PConstants { * sensitive language. Note: In version 125, the mode named CENTER_RADIUS * was shortened to RADIUS. * - * ( end auto-generated ) * @webref shape:attributes + * @webBrief Modifies the location from which rectangles draw. * @param mode either CORNER, CORNERS, CENTER, or RADIUS * @see PGraphics#rect(float, float, float, float) */ @@ -2567,7 +2682,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from rect.xml ) * * Draws a rectangle to the screen. A rectangle is a four-sided shape with * every angle at ninety degrees. By default, the first two parameters set @@ -2575,9 +2689,9 @@ public class PGraphics extends PImage implements PConstants { * fourth sets the height. These parameters may be changed with the * rectMode() function. * - * ( end auto-generated ) * * @webref shape:2d_primitives + * @webBrief Draws a rectangle to the screen. * @param a x-coordinate of the rectangle by default * @param b y-coordinate of the rectangle by default * @param c width of the rectangle by default @@ -2732,7 +2846,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from square.xml ) * * Draws a square to the screen. A square is a four-sided shape with * every angle at ninety degrees and each side is the same length. @@ -2741,9 +2854,9 @@ public class PGraphics extends PImage implements PConstants { * these parameters are interpreted, however, may be changed with the * rectMode() function. * - * ( end auto-generated ) * * @webref shape:2d_primitives + * @webBrief Draws a square to the screen. * @param x x-coordinate of the rectangle by default * @param y y-coordinate of the rectangle by default * @param extent width and height of the rectangle by default @@ -2762,7 +2875,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from ellipseMode.xml ) * * The origin of the ellipse is modified by the ellipseMode() * function. The default configuration is ellipseMode(CENTER), which @@ -2775,8 +2887,9 @@ public class PGraphics extends PImage implements PConstants { * ellipse's bounding box. The parameter must be written in ALL CAPS * because Processing is a case-sensitive language. * - * ( end auto-generated ) * @webref shape:attributes + * @webBrief The origin of the ellipse is modified by the ellipseMode() + * function. * @param mode either CENTER, RADIUS, CORNER, or CORNERS * @see PApplet#ellipse(float, float, float, float) * @see PApplet#arc(float, float, float, float, float, float) @@ -2787,15 +2900,14 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from ellipse.xml ) * * Draws an ellipse (oval) in the display window. An ellipse with an equal * width and height is a circle. The first two parameters set * the location, the third sets the width, and the fourth sets the height. * The origin may be changed with the ellipseMode() function. * - * ( end auto-generated ) * @webref shape:2d_primitives + * @webBrief Draws an ellipse (oval) in the display window. * @param a x-coordinate of the ellipse * @param b y-coordinate of the ellipse * @param c width of the ellipse by default @@ -2843,7 +2955,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from arc.xml ) * * Draws an arc in the display window. Arcs are drawn along the outer edge * of an ellipse defined by the x, y, width and @@ -2851,8 +2962,8 @@ public class PGraphics extends PImage implements PConstants { * with the ellipseMode() function. The start and stop * parameters specify the angles at which to draw the arc. * - * ( end auto-generated ) * @webref shape:2d_primitives + * @webBrief Draws an arc in the display window. * @param a x-coordinate of the arc's ellipse * @param b y-coordinate of the arc's ellipse * @param c width of the arc's ellipse by default @@ -2931,15 +3042,14 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from circle.xml ) * * Draws a circle to the screen. By default, the first two parameters * set the location of the center, and the third sets the shape's width * and height. The origin may be changed with the ellipseMode() * function. * - * ( end auto-generated ) * @webref shape:2d_primitives + * @webBrief Draws a circle to the screen. * @param x x-coordinate of the ellipse * @param y y-coordinate of the ellipse * @param extent width and height of the ellipse by default @@ -2956,14 +3066,13 @@ public class PGraphics extends PImage implements PConstants { // BOX /** - * ( begin auto-generated from box.xml ) * * A box is an extruded rectangle. A box with equal dimension on all sides * is a cube. * - * ( end auto-generated ) * * @webref shape:3d_primitives + * @webBrief A box is an extruded rectangle. * @param size dimension of the box in all dimensions (creates a cube) * @see PGraphics#sphere(float) */ @@ -3039,7 +3148,6 @@ public class PGraphics extends PImage implements PConstants { // SPHERE /** - * ( begin auto-generated from sphereDetail.xml ) * * Controls the detail used to render a sphere by adjusting the number of * vertices of the sphere mesh. The default resolution is 30, which creates @@ -3054,7 +3162,6 @@ public class PGraphics extends PImage implements PConstants { * and vertical resolution independently, use the version of the functions * with two parameters. * - * ( end auto-generated ) * *

Advanced

* Code for sphereDetail() submitted by toxi [031031]. @@ -3062,6 +3169,8 @@ public class PGraphics extends PImage implements PConstants { * * @param res number of segments (minimum 3) used per full circle revolution * @webref shape:3d_primitives + * @webBrief Controls the detail used to render a sphere by adjusting the number of + * vertices of the sphere mesh. * @see PGraphics#sphere(float) */ public void sphereDetail(int res) { @@ -3116,11 +3225,9 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from sphere.xml ) * * A sphere is a hollow ball made from tessellated triangles. * - * ( end auto-generated ) * *

Advanced

*

@@ -3144,6 +3251,7 @@ public class PGraphics extends PImage implements PConstants { * * * @webref shape:3d_primitives + * @webBrief A sphere is a hollow ball made from tessellated triangles. * @param r the radius of the sphere * @see PGraphics#sphereDetail(int) */ @@ -3219,7 +3327,6 @@ public class PGraphics extends PImage implements PConstants { // BEZIER /** - * ( begin auto-generated from bezierPoint.xml ) * * Evaluates the Bezier at point t for points a, b, c, d. The parameter t * varies between 0 and 1, a and d are points on the curve, and b and c are @@ -3227,7 +3334,6 @@ public class PGraphics extends PImage implements PConstants { * second time with the y coordinates to get the location of a bezier curve * at t. * - * ( end auto-generated ) * *

Advanced

* For instance, to convert the following example:
@@ -3251,6 +3357,7 @@ public class PGraphics extends PImage implements PConstants {
    * endShape();
* * @webref shape:curves + * @webBrief Evaluates the Bezier at point t for points a, b, c, d. * @param a coordinate of first point on the curve * @param b coordinate of first control point * @param c coordinate of second control point @@ -3265,18 +3372,17 @@ public class PGraphics extends PImage implements PConstants { return (a*t1 + 3*b*t)*t1*t1 + (3*c*t1 + d*t)*t*t; } /** - * ( begin auto-generated from bezierTangent.xml ) * * Calculates the tangent of a point on a Bezier curve. There is a good * definition of tangent on Wikipedia. * - * ( end auto-generated ) * *

Advanced

* Code submitted by Dave Bollinger (davol) for release 0136. * * @webref shape:curves + * @webBrief Calculates the tangent of a point on a Bezier curve. * @param a coordinate of first point on the curve * @param b coordinate of first control point * @param c coordinate of second control point @@ -3308,15 +3414,14 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from bezierDetail.xml ) * * Sets the resolution at which Beziers display. The default value is 20. * This function is only useful when using the P3D renderer as the default * P2D renderer does not use this information. * - * ( end auto-generated ) * * @webref shape:curves + * @webBrief Sets the resolution at which Beziers display. * @param detail resolution of the curves * @see PGraphics#curve(float, float, float, float, float, float, float, float, float, float, float, float) * @see PGraphics#curveVertex(float, float, float) @@ -3352,7 +3457,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from bezier.xml ) * * Draws a Bezier curve on the screen. These curves are defined by a series * of anchor and control points. The first two parameters specify the first @@ -3362,7 +3466,6 @@ public class PGraphics extends PImage implements PConstants { * Bezier. Using the 3D version requires rendering with P3D (see the * Environment reference for more information). * - * ( end auto-generated ) * *

Advanced

* Draw a cubic bezier curve. The first and last points are @@ -3388,6 +3491,7 @@ public class PGraphics extends PImage implements PConstants { *
bezier(x1, y1, cx, cy, cx, cy, x2, y2);
* * @webref shape:curves + * @webBrief Draws a Bezier curve on the screen. * @param x1 coordinates for the first anchor point * @param y1 coordinates for the first anchor point * @param z1 coordinates for the first anchor point @@ -3423,16 +3527,15 @@ public class PGraphics extends PImage implements PConstants { // CATMULL-ROM CURVE /** - * ( begin auto-generated from curvePoint.xml ) * * Evalutes the curve at point t for points a, b, c, d. The parameter t * varies between 0 and 1, a and d are the control points, and b and c are * the points on the curve. This can be done once with the x coordinates and a * second time with the y coordinates to get the location of a curve at t. * - * ( end auto-generated ) * * @webref shape:curves + * @webBrief Evalutes the curve at point t for points a, b, c, d. * @param a coordinate of first control point * @param b coordinate of first point on the curve * @param c coordinate of second point on the curve @@ -3458,18 +3561,17 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from curveTangent.xml ) * * Calculates the tangent of a point on a curve. There's a good definition * of tangent on Wikipedia. * - * ( end auto-generated ) * *

Advanced

* Code thanks to Dave Bollinger (Bug #715) * * @webref shape:curves + * @webBrief Calculates the tangent of a point on a curve. * @param a coordinate of first point on the curve * @param b coordinate of first control point * @param c coordinate of second control point @@ -3496,15 +3598,14 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from curveDetail.xml ) * * Sets the resolution at which curves display. The default value is 20. * This function is only useful when using the P3D renderer as the default * P2D renderer does not use this information. * - * ( end auto-generated ) * * @webref shape:curves + * @webBrief Sets the resolution at which curves display. * @param detail resolution of the curves * @see PGraphics#curve(float, float, float, float, float, float, float, float, float, float, float, float) * @see PGraphics#curveVertex(float, float) @@ -3517,7 +3618,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from curveTightness.xml ) * * Modifies the quality of forms created with curve() and * curveVertex(). The parameter squishy determines how the @@ -3527,9 +3627,10 @@ public class PGraphics extends PImage implements PConstants { * within the range -5.0 and 5.0 will deform the curves but will leave them * recognizable and as values increase in magnitude, they will continue to deform. * - * ( end auto-generated ) * * @webref shape:curves + * @webBrief Modifies the quality of forms created with curve() and + * curveVertex(). * @param tightness amount of deformation from the original vertices * @see PGraphics#curve(float, float, float, float, float, float, float, float, float, float, float, float) * @see PGraphics#curveVertex(float, float) @@ -3594,7 +3695,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from curve.xml ) * * Draws a curved line on the screen. The first and second parameters * specify the beginning control point and the last two parameters specify @@ -3606,7 +3706,6 @@ public class PGraphics extends PImage implements PConstants { * implementation of Catmull-Rom splines. Using the 3D version requires * rendering with P3D (see the Environment reference for more information). * - * ( end auto-generated ) * *

Advanced

* As of revision 0070, this function no longer doubles the first @@ -3623,6 +3722,7 @@ public class PGraphics extends PImage implements PConstants { * * * @webref shape:curves + * @webBrief Draws a curved line on the screen. * @param x1 coordinates for the beginning control point * @param y1 coordinates for the beginning control point * @param x2 coordinates for the first point @@ -3738,7 +3838,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from imageMode.xml ) * * Modifies the location from which images draw. The default mode is * imageMode(CORNER), which specifies the location to be the upper @@ -3753,9 +3852,9 @@ public class PGraphics extends PImage implements PConstants { * The parameter to imageMode() must be written in ALL CAPS because * Processing is a case-sensitive language. * - * ( end auto-generated ) * * @webref image:loading_displaying + * @webBrief Modifies the location from which images draw. * @param mode either CORNER, CORNERS, or CENTER * @see PApplet#loadImage(String, String) * @see PImage @@ -3774,7 +3873,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from image.xml ) * * Displays images to the screen. The images must be in the sketch's "data" * directory to load correctly. Select "Add file..." from the "Sketch" menu @@ -3793,13 +3891,13 @@ public class PGraphics extends PImage implements PConstants { * The color of an image may be modified with the tint() function. * 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. * * @webref image:loading_displaying + * @webBrief Displays images to the screen. * @param img the image to display * @param a x-coordinate of the image by default * @param b y-coordinate of the image by default @@ -3957,7 +4055,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from shapeMode.xml ) * * Modifies the location from which shapes draw. The default mode is * shapeMode(CORNER), which specifies the location to be the upper @@ -3971,9 +4068,9 @@ public class PGraphics extends PImage implements PConstants { * and height. The parameter must be written in "ALL CAPS" because * Processing is a case sensitive language. * - * ( end auto-generated ) * * @webref shape:loading_displaying + * @webBrief Modifies the location from which shapes draw. * @param mode either CORNER, CORNERS, CENTER * @see PShape * @see PGraphics#shape(PShape) @@ -4005,7 +4102,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from shape.xml ) * * Displays shapes to the screen. The shapes must be in the sketch's "data" * directory to load correctly. Select "Add file..." from the "Sketch" menu @@ -4022,9 +4118,9 @@ public class PGraphics extends PImage implements PConstants { * Note complex shapes may draw awkwardly with P3D. This renderer does not * yet support shapes that have holes or complicated breaks. * - * ( end auto-generated ) * * @webref shape:loading_displaying + * @webBrief Displays shapes to the screen. * @param shape the shape to display * @param x x-coordinate of the shape * @param y y-coordinate of the shape @@ -4161,7 +4257,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from textAlign.xml ) * * Sets the current alignment for drawing text. The parameters LEFT, * CENTER, and RIGHT set the display characteristics of the letters in @@ -4188,9 +4283,9 @@ public class PGraphics extends PImage implements PConstants { * textAscent() or textDescent() so that the hack works even * if you change the size of the font. * - * ( end auto-generated ) * * @webref typography:attributes + * @webBrief Sets the current alignment for drawing text. * @param alignX horizontal alignment, either LEFT, CENTER, or RIGHT * @param alignY vertical alignment, either TOP, BOTTOM, CENTER, or BASELINE * @see PApplet#loadFont(String) @@ -4207,16 +4302,15 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from textAscent.xml ) * * Returns ascent of the current font at its current size. This information * is useful for determining the height of the font above the baseline. For * example, adding the textAscent() and textDescent() values * will give you the total height of the line. * - * ( end auto-generated ) * * @webref typography:metrics + * @webBrief Returns ascent of the current font at its current size. * @see PGraphics#textDescent() */ public float textAscent() { @@ -4228,16 +4322,15 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from textDescent.xml ) * * Returns descent of the current font at its current size. This * information is useful for determining the height of the font below the * baseline. For example, adding the textAscent() and * textDescent() values will give you the total height of the line. * - * ( end auto-generated ) * * @webref typography:metrics + * @webBrief Returns descent of the current font at its current size. * @see PGraphics#textAscent() */ public float textDescent() { @@ -4249,7 +4342,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from textFont.xml ) * * Sets the current font that will be drawn with the text() * function. Fonts must be loaded with loadFont() before it can be @@ -4267,9 +4359,10 @@ public class PGraphics extends PImage implements PConstants { * available: when the font is still installed, or the font is created via * the createFont() function (rather than the Create Font tool). * - * ( end auto-generated ) * * @webref typography:loading_displaying + * @webBrief Sets the current font that will be drawn with the text() + * function. * @param which any variable of the type PFont * @see PApplet#createFont(String, float, boolean) * @see PApplet#loadFont(String) @@ -4349,14 +4442,13 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from textLeading.xml ) * * Sets the spacing between lines of text in units of pixels. This setting * will be used in all subsequent calls to the text() function. * - * ( end auto-generated ) * * @webref typography:attributes + * @webBrief Sets the spacing between lines of text in units of pixels. * @param leading the size in pixels for spacing between lines * @see PApplet#loadFont(String) * @see PFont#PFont @@ -4370,7 +4462,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( 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 @@ -4390,9 +4481,9 @@ public class PGraphics extends PImage implements PConstants { * 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 ) * * @webref typography:attributes + * @webBrief Sets the way text draws to the screen. * @param mode either MODEL or SHAPE * @see PApplet#loadFont(String) * @see PFont#PFont @@ -4431,14 +4522,13 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from textSize.xml ) * * Sets the current font size. This size will be used in all subsequent * calls to the text() function. Font size is measured in units of pixels. * - * ( end auto-generated ) * * @webref typography:attributes + * @webBrief Sets the current font size. * @param size the size of the letters in units of pixels * @see PApplet#loadFont(String) * @see PFont#PFont @@ -4496,13 +4586,12 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from textWidth.xml ) * * Calculates and returns the width of any character or text string. * - * ( end auto-generated ) * * @webref typography:attributes + * @webBrief Calculates and returns the width of any character or text string. * @param str the String of characters to measure * @see PApplet#loadFont(String) * @see PFont#PFont @@ -4567,7 +4656,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from text.xml ) * * Draws text to the screen. Displays the information specified in the * data or stringdata parameters on the screen in the @@ -4583,9 +4671,9 @@ public class PGraphics extends PImage implements PConstants { * inside a rectangle, the coordinates are interpreted based on the current * rectMode() setting. * - * ( end auto-generated ) * * @webref typography:loading_displaying + * @webBrief Draws text to the screen. * @param c the alphanumeric character to be displayed * @param x x-coordinate of text * @param y y-coordinate of text @@ -5167,7 +5255,6 @@ public class PGraphics extends PImage implements PConstants { // PARITY WITH P5.JS /** - * ( begin auto-generated from push.xml ) * * The push() function saves the current drawing style * settings and transformations, while pop() restores these @@ -5193,9 +5280,11 @@ public class PGraphics extends PImage implements PConstants { * transformations (rotate, scale, translate) and the drawing styles * at the same time. * - * ( end auto-generated ) * * @webref structure + * @webBrief The push() function saves the current drawing style + * settings and transformations, while pop() restores these + * settings. * @see PGraphics#pop() */ public void push() { @@ -5204,7 +5293,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from pop.xml ) * * The pop() function restores the previous drawing style * settings and transformations after push() has changed them. @@ -5230,9 +5318,10 @@ public class PGraphics extends PImage implements PConstants { * transformations (rotate, scale, translate) and the drawing styles * at the same time. * - * ( end auto-generated ) * * @webref structure + * @webBrief The pop() function restores the previous drawing style + * settings and transformations after push() has changed them. * @see PGraphics#push() */ public void pop() { @@ -5248,7 +5337,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from pushMatrix.xml ) * * Pushes the current transformation matrix onto the matrix stack. * Understanding pushMatrix() and popMatrix() requires @@ -5259,9 +5347,9 @@ public class PGraphics extends PImage implements PConstants { * the other transformation functions and may be embedded to control the * scope of the transformations. * - * ( end auto-generated ) * * @webref transform + * @webBrief Pushes the current transformation matrix onto the matrix stack. * @see PGraphics#popMatrix() * @see PGraphics#translate(float, float, float) * @see PGraphics#scale(float) @@ -5276,7 +5364,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from popMatrix.xml ) * * Pops the current transformation matrix off the matrix stack. * Understanding pushing and popping requires understanding the concept of @@ -5286,9 +5373,9 @@ public class PGraphics extends PImage implements PConstants { * in conjuction with the other transformation functions and may be * embedded to control the scope of the transformations. * - * ( end auto-generated ) * * @webref transform + * @webBrief Pops the current transformation matrix off the matrix stack. * @see PGraphics#pushMatrix() */ public void popMatrix() { @@ -5303,7 +5390,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from translate.xml ) * * Specifies an amount to displace objects within the display window. The * x parameter specifies left/right translation, the y @@ -5318,9 +5404,9 @@ public class PGraphics extends PImage implements PConstants { * transformation is reset when the loop begins again. This function can be * further controlled by the pushMatrix() and popMatrix(). * - * ( end auto-generated ) * * @webref transform + * @webBrief Specifies an amount to displace objects within the display window. * @param x left/right translation * @param y up/down translation * @see PGraphics#popMatrix() @@ -5345,7 +5431,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from rotate.xml ) * * Rotates a shape the amount specified by the angle parameter. * Angles should be specified in radians (values from 0 to TWO_PI) or @@ -5363,9 +5448,9 @@ public class PGraphics extends PImage implements PConstants { * matrix by a rotation matrix. This function can be further controlled by * the pushMatrix() and popMatrix(). * - * ( end auto-generated ) * * @webref transform + * @webBrief Rotates a shape the amount specified by the angle parameter. * @param angle angle of rotation specified in radians * @see PGraphics#popMatrix() * @see PGraphics#pushMatrix() @@ -5381,7 +5466,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from rotateX.xml ) * * Rotates a shape around the x-axis the amount specified by the * angle parameter. Angles should be specified in radians (values @@ -5396,9 +5480,10 @@ public class PGraphics extends PImage implements PConstants { * This function requires using P3D as a third parameter to size() * as shown in the example above. * - * ( end auto-generated ) * * @webref transform + * @webBrief Rotates a shape around the x-axis the amount specified by the + * angle parameter. * @param angle angle of rotation specified in radians * @see PGraphics#popMatrix() * @see PGraphics#pushMatrix() @@ -5414,7 +5499,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from rotateY.xml ) * * Rotates a shape around the y-axis the amount specified by the * angle parameter. Angles should be specified in radians (values @@ -5429,9 +5513,10 @@ public class PGraphics extends PImage implements PConstants { * This function requires using P3D as a third parameter to size() * as shown in the examples above. * - * ( end auto-generated ) * * @webref transform + * @webBrief Rotates a shape around the y-axis the amount specified by the + * angle parameter. * @param angle angle of rotation specified in radians * @see PGraphics#popMatrix() * @see PGraphics#pushMatrix() @@ -5447,7 +5532,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from rotateZ.xml ) * * Rotates a shape around the z-axis the amount specified by the * angle parameter. Angles should be specified in radians (values @@ -5462,9 +5546,10 @@ public class PGraphics extends PImage implements PConstants { * This function requires using P3D as a third parameter to size() * as shown in the examples above. * - * ( end auto-generated ) * * @webref transform + * @webBrief Rotates a shape around the z-axis the amount specified by the + * angle parameter. * @param angle angle of rotation specified in radians * @see PGraphics#popMatrix() * @see PGraphics#pushMatrix() @@ -5493,7 +5578,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from scale.xml ) * * Increases or decreases the size of a shape by expanding and contracting * vertices. Objects always scale from their relative origin to the @@ -5508,9 +5592,10 @@ public class PGraphics extends PImage implements PConstants { * parameter for size() as shown in the example above. This function * can be further controlled by pushMatrix() and popMatrix(). * - * ( end auto-generated ) * * @webref transform + * @webBrief Increases or decreases the size of a shape by expanding and contracting + * vertices. * @param s percentage to scale the object * @see PGraphics#pushMatrix() * @see PGraphics#popMatrix() @@ -5549,7 +5634,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from shearX.xml ) * * Shears a shape around the x-axis the amount specified by the * angle parameter. Angles should be specified in radians (values @@ -5566,9 +5650,10 @@ public class PGraphics extends PImage implements PConstants { * matrix by a rotation matrix. This function can be further controlled by * the pushMatrix() and popMatrix() functions. * - * ( end auto-generated ) * * @webref transform + * @webBrief Shears a shape around the x-axis the amount specified by the + * angle parameter. * @param angle angle of shear specified in radians * @see PGraphics#popMatrix() * @see PGraphics#pushMatrix() @@ -5583,7 +5668,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from shearY.xml ) * * Shears a shape around the y-axis the amount specified by the * angle parameter. Angles should be specified in radians (values @@ -5600,9 +5684,10 @@ public class PGraphics extends PImage implements PConstants { * matrix by a rotation matrix. This function can be further controlled by * the pushMatrix() and popMatrix() functions. * - * ( end auto-generated ) * * @webref transform + * @webBrief Shears a shape around the y-axis the amount specified by the + * angle parameter. * @param angle angle of shear specified in radians * @see PGraphics#popMatrix() * @see PGraphics#pushMatrix() @@ -5622,14 +5707,13 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from resetMatrix.xml ) * * Replaces the current matrix with the identity matrix. The equivalent * function in OpenGL is glLoadIdentity(). * - * ( end auto-generated ) * * @webref transform + * @webBrief Replaces the current matrix with the identity matrix. * @see PGraphics#pushMatrix() * @see PGraphics#popMatrix() * @see PGraphics#applyMatrix(PMatrix) @@ -5640,16 +5724,16 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from applyMatrix.xml ) * * Multiplies the current matrix by the one specified through the * parameters. This is very slow because it will try to calculate the * inverse of the transform, so avoid it whenever possible. The equivalent * function in OpenGL is glMultMatrix(). * - * ( end auto-generated ) * * @webref transform + * @webBrief Multiplies the current matrix by the one specified through the + * parameters. * @source * @see PGraphics#pushMatrix() * @see PGraphics#popMatrix() @@ -5773,14 +5857,14 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from printMatrix.xml ) * * Prints the current matrix to the Console (the text window at the bottom * of Processing). * - * ( end auto-generated ) * * @webref transform + * @webBrief Prints the current matrix to the Console (the text window at the bottom + * of Processing). * @see PGraphics#pushMatrix() * @see PGraphics#popMatrix() * @see PGraphics#resetMatrix() @@ -5796,7 +5880,6 @@ public class PGraphics extends PImage implements PConstants { // CAMERA /** - * ( begin auto-generated from beginCamera.xml ) * * The beginCamera() and endCamera() functions enable * advanced customization of the camera space. The functions are useful if @@ -5815,9 +5898,10 @@ public class PGraphics extends PImage implements PConstants { * following endCamera() and pairs of beginCamera() and * endCamera() cannot be nested. * - * ( end auto-generated ) * * @webref lights_camera:camera + * @webBrief The beginCamera() and endCamera() functions enable + * advanced customization of the camera space. * @see PGraphics#camera() * @see PGraphics#endCamera() * @see PGraphics#applyMatrix(PMatrix) @@ -5830,15 +5914,15 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from endCamera.xml ) * * The beginCamera() and endCamera() functions enable * advanced customization of the camera space. Please see the reference for * beginCamera() for a description of how the functions are used. * - * ( end auto-generated ) * * @webref lights_camera:camera + * @webBrief The beginCamera() and endCamera() functions enable + * advanced customization of the camera space. * @see PGraphics#beginCamera() * @see PGraphics#camera(float, float, float, float, float, float, float, float, float) */ @@ -5847,7 +5931,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( 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 @@ -5859,9 +5942,9 @@ public class PGraphics extends PImage implements PConstants { * 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 + * @webBrief Sets the position of the camera. * @see PGraphics#beginCamera() * @see PGraphics#endCamera() * @see PGraphics#frustum(float, float, float, float, float, float) @@ -5888,13 +5971,13 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from printCamera.xml ) * * Prints the current camera matrix to the Console (the text window at the * bottom of Processing). * - * ( end auto-generated ) * @webref lights_camera:camera + * @webBrief Prints the current camera matrix to the Console (the text window at the + * bottom of Processing). * @see PGraphics#camera(float, float, float, float, float, float, float, float, float) */ public void printCamera() { @@ -5908,7 +5991,6 @@ public class PGraphics extends PImage implements PConstants { // PROJECTION /** - * ( begin auto-generated from ortho.xml ) * * Sets an orthographic projection and defines a parallel clipping volume. * All objects with the same dimension appear the same size, regardless of @@ -5919,9 +6001,9 @@ public class PGraphics extends PImage implements PConstants { * parameters are given, the default is used: ortho(0, width, 0, height, * -10, 10). * - * ( end auto-generated ) * * @webref lights_camera:camera + * @webBrief Sets an orthographic projection and defines a parallel clipping volume. */ public void ortho() { showMissingWarning("ortho"); @@ -5949,7 +6031,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from perspective.xml ) * * Sets a perspective projection applying foreshortening, making distant * objects appear smaller than closer ones. The parameters define a viewing @@ -5962,9 +6043,10 @@ public class PGraphics extends PImage implements PConstants { * default values are: perspective(PI/3.0, width/height, cameraZ/10.0, * cameraZ*10.0) where cameraZ is ((height/2.0) / tan(PI*60.0/360.0)); * - * ( end auto-generated ) * * @webref lights_camera:camera + * @webBrief Sets a perspective projection applying foreshortening, making distant + * objects appear smaller than closer ones. */ public void perspective() { showMissingWarning("perspective"); @@ -5981,15 +6063,14 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from frustum.xml ) * * Sets a perspective matrix defined through the parameters. Works like * glFrustum, except it wipes out the current perspective matrix rather * than muliplying itself with it. * - * ( end auto-generated ) * * @webref lights_camera:camera + * @webBrief Sets a perspective matrix defined through the parameters. * @param left left coordinate of the clipping plane * @param right right coordinate of the clipping plane * @param bottom bottom coordinate of the clipping plane @@ -6008,14 +6089,13 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from printProjection.xml ) * * Prints the current projection matrix to the Console (the text window at * the bottom of Processing). * - * ( end auto-generated ) * * @webref lights_camera:camera + * @webBrief Prints the current projection matrix to the Console. * @see PGraphics#camera(float, float, float, float, float, float, float, float, float) */ public void printProjection() { @@ -6030,14 +6110,14 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from screenX.xml ) * * Takes a three-dimensional X, Y, Z position and returns the X value for * where it will appear on a (two-dimensional) screen. * - * ( end auto-generated ) * * @webref lights_camera:coordinates + * @webBrief Takes a three-dimensional X, Y, Z position and returns the X value for + * where it will appear on a (two-dimensional) screen. * @param x 3D x-coordinate to be mapped * @param y 3D y-coordinate to be mapped * @see PGraphics#screenY(float, float, float) @@ -6050,14 +6130,14 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from screenY.xml ) * * Takes a three-dimensional X, Y, Z position and returns the Y value for * where it will appear on a (two-dimensional) screen. * - * ( end auto-generated ) * * @webref lights_camera:coordinates + * @webBrief Takes a three-dimensional X, Y, Z position and returns the Y value for + * where it will appear on a (two-dimensional) screen. * @param x 3D x-coordinate to be mapped * @param y 3D y-coordinate to be mapped * @see PGraphics#screenX(float, float, float) @@ -6089,14 +6169,14 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from screenZ.xml ) * * Takes a three-dimensional X, Y, Z position and returns the Z value for * where it will appear on a (two-dimensional) screen. * - * ( end auto-generated ) * * @webref lights_camera:coordinates + * @webBrief Takes a three-dimensional X, Y, Z position and returns the Z value for + * where it will appear on a (two-dimensional) screen. * @param x 3D x-coordinate to be mapped * @param y 3D y-coordinate to be mapped * @param z 3D z-coordinate to be mapped @@ -6110,7 +6190,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from modelX.xml ) * * Returns the three-dimensional X, Y, Z position in model space. This * returns the X value for a given coordinate based on the current set of @@ -6125,9 +6204,9 @@ public class PGraphics extends PImage implements PConstants { * (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 + * @webBrief Returns the three-dimensional X, Y, Z position in model space. * @param x 3D x-coordinate to be mapped * @param y 3D y-coordinate to be mapped * @param z 3D z-coordinate to be mapped @@ -6141,7 +6220,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( 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 @@ -6156,9 +6234,9 @@ public class PGraphics extends PImage implements PConstants { * (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 + * @webBrief Returns the three-dimensional X, Y, Z position in model space. * @param x 3D x-coordinate to be mapped * @param y 3D y-coordinate to be mapped * @param z 3D z-coordinate to be mapped @@ -6172,7 +6250,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( 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 @@ -6187,9 +6264,9 @@ public class PGraphics extends PImage implements PConstants { * (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 + * @webBrief Returns the three-dimensional X, Y, Z position in model space. * @param x 3D x-coordinate to be mapped * @param y 3D y-coordinate to be mapped * @param z 3D z-coordinate to be mapped @@ -6208,7 +6285,6 @@ public class PGraphics extends PImage implements PConstants { // STYLE /** - * ( begin auto-generated from pushStyle.xml ) * * The pushStyle() function saves the current style settings and * popStyle() restores the prior settings. Note that these functions @@ -6225,9 +6301,9 @@ public class PGraphics extends PImage implements PConstants { * textAlign(), textFont(), textMode(), textSize(), textLeading(), * emissive(), specular(), shininess(), ambient() * - * ( end auto-generated ) * * @webref structure + * @webBrief Saves the current style settings and popStyle() restores the prior settings. * @see PGraphics#popStyle() */ public void pushStyle() { @@ -6242,7 +6318,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from popStyle.xml ) * * The pushStyle() function saves the current style settings and * popStyle() restores the prior settings; these functions are @@ -6252,9 +6327,9 @@ public class PGraphics extends PImage implements PConstants { * pushStyle() and popStyle() functions can be embedded to * provide more control (see the second example above for a demonstration.) * - * ( end auto-generated ) * * @webref structure + * @webBrief Saves the current style settings and popStyle() restores the prior settings * @see PGraphics#pushStyle() */ public void popStyle() { @@ -6406,7 +6481,6 @@ public class PGraphics extends PImage implements PConstants { // STROKE CAP/JOIN/WEIGHT /** - * ( begin auto-generated from strokeWeight.xml ) * * Sets the width of the stroke used for lines, points, and the border * around shapes. All widths are set in units of pixels. @@ -6420,9 +6494,10 @@ public class PGraphics extends PImage implements PConstants { * operating system's OpenGL implementation. For instance, the thickness * may not go higher than 10 pixels. * - * ( end auto-generated ) * * @webref shape:attributes + * @webBrief Sets the width of the stroke used for lines, points, and the border + * around shapes. * @param weight the weight (in pixels) of the stroke * @see PGraphics#stroke(int, float) * @see PGraphics#strokeJoin(int) @@ -6433,7 +6508,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from strokeJoin.xml ) * * Sets the style of the joints which connect line segments. These joints * are either mitered, beveled, or rounded and specified with the @@ -6445,9 +6519,9 @@ public class PGraphics extends PImage implements PConstants { * Issue 123). More information about the renderers can be found in the * size() reference. * - * ( end auto-generated ) * * @webref shape:attributes + * @webBrief Sets the style of the joints which connect line segments. * @param join either MITER, BEVEL, ROUND * @see PGraphics#stroke(int, float) * @see PGraphics#strokeWeight(float) @@ -6458,7 +6532,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from strokeCap.xml ) * * Sets the style for rendering line endings. These ends are either * squared, extended, or rounded and specified with the corresponding @@ -6469,9 +6542,8 @@ public class PGraphics extends PImage implements PConstants { * Issue 123). More information about the renderers can be found in the * size() reference. * - * ( end auto-generated ) - * * @webref shape:attributes + * @webBrief Sets the style for rendering line endings. * @param cap either SQUARE, PROJECT, or ROUND * @see PGraphics#stroke(int, float) * @see PGraphics#strokeWeight(float) @@ -6490,14 +6562,13 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from noStroke.xml ) * * Disables drawing the stroke (outline). If both noStroke() and * noFill() are called, nothing will be drawn to the screen. * - * ( end auto-generated ) * * @webref color:setting + * @webBrief Disables drawing the stroke (outline). * @see PGraphics#stroke(int, float) * @see PGraphics#fill(float, float, float, float) * @see PGraphics#noFill() @@ -6508,7 +6579,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from stroke.xml ) * * Sets the color used to draw lines and borders around shapes. This color * is either specified in terms of the RGB or HSB color depending on the @@ -6527,8 +6597,8 @@ public class PGraphics extends PImage implements PConstants { * current maximum value as specified by colorMode(). The default * maximum value is 255. * - * ( end auto-generated ) - * + * @webref color:setting + * @webBrief Sets the color used to draw lines and borders around shapes. * @param rgb color value in hexadecimal notation * @see PGraphics#noStroke() * @see PGraphics#strokeWeight(float) @@ -6574,7 +6644,6 @@ public class PGraphics extends PImage implements PConstants { * @param v1 red or hue value (depending on current color mode) * @param v2 green or saturation value (depending on current color mode) * @param v3 blue or brightness value (depending on current color mode) - * @webref color:setting */ public void stroke(float v1, float v2, float v3) { colorCalc(v1, v2, v3); @@ -6610,14 +6679,14 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from noTint.xml ) * * Removes the current fill value for displaying images and reverts to * displaying images with their original hues. * - * ( end auto-generated ) * * @webref image:loading_displaying + * @webBrief Removes the current fill value for displaying images and reverts to + * displaying images with their original hues. * @usage web_application * @see PGraphics#tint(float, float, float, float) * @see PGraphics#image(PImage, float, float, float, float) @@ -6628,7 +6697,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( 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.
@@ -6653,9 +6721,9 @@ public class PGraphics extends PImage implements PConstants { * The tint() function is also used to control the coloring of * textures in 3D. * - * ( end auto-generated ) * * @webref image:loading_displaying + * @webBrief Sets the fill value for displaying images. * @usage web_application * @param rgb color value in hexadecimal notation * @see PGraphics#noTint() @@ -6729,14 +6797,13 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from noFill.xml ) * * Disables filling geometry. If both noStroke() and noFill() * are called, nothing will be drawn to the screen. * - * ( end auto-generated ) * * @webref color:setting + * @webBrief Disables filling geometry. * @usage web_application * @see PGraphics#fill(float, float, float, float) * @see PGraphics#stroke(int, float) @@ -6748,7 +6815,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from fill.xml ) * * Sets the color used to fill shapes. For example, if you run fill(204, * 102, 0), all subsequent shapes will be filled with orange. This @@ -6770,9 +6836,9 @@ public class PGraphics extends PImage implements PConstants { *

* To change the color of an image (or a texture), use tint(). * - * ( end auto-generated ) * * @webref color:setting + * @webBrief Sets the color used to fill shapes. * @usage web_application * @param rgb color variable or hex value * @see PGraphics#noFill() @@ -6849,7 +6915,6 @@ public class PGraphics extends PImage implements PConstants { // MATERIAL PROPERTIES /** - * ( begin auto-generated from ambient.xml ) * * Sets the ambient reflectance for shapes drawn to the screen. This is * combined with the ambient light component of environment. The color @@ -6859,9 +6924,9 @@ public class PGraphics extends PImage implements PConstants { * reflect. Used in combination with emissive(), specular(), * and shininess() in setting the material properties of shapes. * - * ( end auto-generated ) * * @webref lights_camera:material_properties + * @webBrief Sets the ambient reflectance for shapes drawn to the screen. * @usage web_application * @param rgb any value of the color datatype * @see PGraphics#emissive(float, float, float) @@ -6908,7 +6973,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from specular.xml ) * * Sets the specular color of the materials used for shapes drawn to the * screen, which sets the color of hightlights. Specular refers to light @@ -6917,9 +6981,10 @@ public class PGraphics extends PImage implements PConstants { * with emissive(), ambient(), and shininess() in * setting the material properties of shapes. * - * ( end auto-generated ) * * @webref lights_camera:material_properties + * @webBrief Sets the specular color of the materials used for shapes drawn to the + * screen, which sets the color of hightlights. * @usage web_application * @param rgb color to set * @see PGraphics#lightSpecular(float, float, float) @@ -6971,15 +7036,14 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from shininess.xml ) * * Sets the amount of gloss in the surface of shapes. Used in combination * with ambient(), specular(), and emissive() in * setting the material properties of shapes. * - * ( end auto-generated ) * * @webref lights_camera:material_properties + * @webBrief Sets the amount of gloss in the surface of shapes. * @usage web_application * @param shine degree of shininess * @see PGraphics#emissive(float, float, float) @@ -6991,16 +7055,16 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from emissive.xml ) * * Sets the emissive color of the material used for drawing shapes drawn to * the screen. Used in combination with ambient(), * specular(), and shininess() in setting the material * properties of shapes. * - * ( end auto-generated ) * * @webref lights_camera:material_properties + * @webBrief Sets the emissive color of the material used for drawing shapes drawn to + * the screen. * @usage web_application * @param rgb color to set * @see PGraphics#ambient(float, float, float) @@ -7058,7 +7122,6 @@ public class PGraphics extends PImage implements PConstants { // display warning messages that the functions are not available. /** - * ( begin auto-generated from lights.xml ) * * Sets the default ambient light, directional light, falloff, and specular * values. The defaults are ambientLight(128, 128, 128) and @@ -7068,9 +7131,10 @@ public class PGraphics extends PImage implements PConstants { * looping program will cause them to only have an effect the first time * through the loop. * - * ( end auto-generated ) * * @webref lights_camera:lights + * @webBrief Sets the default ambient light, directional light, falloff, and specular + * values. * @usage web_application * @see PGraphics#ambientLight(float, float, float, float, float, float) * @see PGraphics#directionalLight(float, float, float, float, float, float) @@ -7083,16 +7147,15 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( 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 * drawn after a set of lighted 3D geometry. * - * ( end auto-generated ) * * @webref lights_camera:lights + * @webBrief Disable all lighting. * @usage web_application * @see PGraphics#lights() */ @@ -7101,7 +7164,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from ambientLight.xml ) * * Adds an ambient light. Ambient light doesn't come from a specific * direction, the rays have light have bounced around so much that objects @@ -7112,9 +7174,9 @@ public class PGraphics extends PImage implements PConstants { * have an effect the first time through the loop. The effect of the * parameters is determined by the current color mode. * - * ( end auto-generated ) * * @webref lights_camera:lights + * @webBrief Adds an ambient light. * @usage web_application * @param v1 red or hue value (depending on current color mode) * @param v2 green or saturation value (depending on current color mode) @@ -7139,7 +7201,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from directionalLight.xml ) * * Adds a directional light. Directional light comes from one direction and * is stronger when hitting a surface squarely and weaker if it hits at a a @@ -7153,9 +7214,9 @@ public class PGraphics extends PImage implements PConstants { * direction the light is facing. For example, setting ny to -1 will * cause the geometry to be lit from below (the light is facing directly upward). * - * ( end auto-generated ) * * @webref lights_camera:lights + * @webBrief Adds a directional light. * @usage web_application * @param v1 red or hue value (depending on current color mode) * @param v2 green or saturation value (depending on current color mode) @@ -7174,7 +7235,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from pointLight.xml ) * * Adds a point light. Lights need to be included in the draw() to * remain persistent in a looping program. Placing them in the @@ -7184,9 +7244,9 @@ public class PGraphics extends PImage implements PConstants { * mode. The x, y, and z parameters set the position * of the light. * - * ( end auto-generated ) * * @webref lights_camera:lights + * @webBrief Adds a point light. * @usage web_application * @param v1 red or hue value (depending on current color mode) * @param v2 green or saturation value (depending on current color mode) @@ -7205,7 +7265,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from spotLight.xml ) * * Adds a spot light. Lights need to be included in the draw() to * remain persistent in a looping program. Placing them in the @@ -7217,9 +7276,9 @@ public class PGraphics extends PImage implements PConstants { * direction or light. The angle parameter affects angle of the * spotlight cone. * - * ( end auto-generated ) * * @webref lights_camera:lights + * @webBrief Adds a spot light. * @usage web_application * @param v1 red or hue value (depending on current color mode) * @param v2 green or saturation value (depending on current color mode) @@ -7245,7 +7304,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from lightFalloff.xml ) * * Sets the falloff rates for point lights, spot lights, and ambient * lights. The parameters are used to determine the falloff with the @@ -7260,9 +7318,10 @@ public class PGraphics extends PImage implements PConstants { * and falloff. You can think of it as a point light that doesn't care * which direction a surface is facing. * - * ( end auto-generated ) * * @webref lights_camera:lights + * @webBrief Sets the falloff rates for point lights, spot lights, and ambient + * lights. * @usage web_application * @param constant constant value or determining falloff * @param linear linear value for determining falloff @@ -7278,7 +7337,6 @@ public class PGraphics extends PImage implements PConstants { } /** - * ( begin auto-generated from lightSpecular.xml ) * * Sets the specular color for lights. Like fill(), it affects only * the elements which are created after it in the code. Specular refers to @@ -7288,9 +7346,9 @@ public class PGraphics extends PImage implements PConstants { * specular material qualities set through the specular() and * shininess() functions. * - * ( end auto-generated ) * * @webref lights_camera:lights + * @webBrief Sets the specular color for lights. * @usage web_application * @param v1 red or hue value (depending on current color mode) * @param v2 green or saturation value (depending on current color mode) @@ -7313,7 +7371,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from background.xml ) * * The background() function sets the color used for the background * of the Processing window. The default background is light gray. In the @@ -7329,7 +7386,6 @@ public class PGraphics extends PImage implements PConstants { * It is not possible to use transparency (alpha) in background colors with * 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 @@ -7342,6 +7398,7 @@ public class PGraphics extends PImage implements PConstants { * and draw a rectangle.

* * @webref color:setting + * @webBrief Sets the color used for the background of the Processing window. * @usage web_application * @param rgb any value of the color datatype * @see PGraphics#stroke(float) @@ -7428,7 +7485,15 @@ public class PGraphics extends PImage implements PConstants { } /** + * Clears the pixels within a buffer. This function only works on + * PGraphics objects created with the createGraphics() + * function. Unlike the main graphics context (the display window), + * pixels in additional graphics areas created with createGraphics() + * can be entirely or partially transparent. This function clears + * everything in a PGraphics object to make all of the pixels + * 100% transparent. * @webref color:setting + * @webBrief Clears the pixels within a buffer. */ public void clear() { background(0, 0, 0, 0); @@ -7538,7 +7603,6 @@ public class PGraphics extends PImage implements PConstants { // COLOR MODE /** - * ( begin auto-generated from colorMode.xml ) * * Changes the way Processing interprets color data. By default, the * parameters for fill(), stroke(), background(), and @@ -7549,9 +7613,9 @@ public class PGraphics extends PImage implements PConstants { * are specified between 0 and 1. The limits for defining colors are * altered by setting the parameters range1, range2, range3, and range 4. * - * ( end auto-generated ) * * @webref color:setting + * @webBrief Changes the way Processing interprets color data. * @usage web_application * @param mode Either RGB or HSB, corresponding to Red/Green/Blue and Hue/Saturation/Brightness * @see PGraphics#background(float) @@ -7883,12 +7947,11 @@ public class PGraphics extends PImage implements PConstants { // Vee have veys of making the colors talk. /** - * ( begin auto-generated from alpha.xml ) * * Extracts the alpha value from a color. * - * ( end auto-generated ) * @webref color:creating_reading + * @webBrief Extracts the alpha value from a color. * @usage web_application * @param rgb any value of the color datatype * @see PGraphics#red(int) @@ -7906,7 +7969,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from red.xml ) * * Extracts the red value from a color, scaled to match current * colorMode(). This value is always returned as a float so be @@ -7918,9 +7980,9 @@ public class PGraphics extends PImage implements PConstants { * />
float r1 = red(myColor);
float r2 = myColor >> 16 * & 0xFF;
* - * ( end auto-generated ) * * @webref color:creating_reading + * @webBrief Extracts the red value from a color, scaled to match current colorMode(). * @usage web_application * @param rgb any value of the color datatype * @see PGraphics#green(int) @@ -7939,7 +8001,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from green.xml ) * * Extracts the green value from a color, scaled to match current * colorMode(). This value is always returned as a float so be @@ -7951,9 +8012,9 @@ public class PGraphics extends PImage implements PConstants { * are equivalent:
float r1 = green(myColor);
float r2 = * myColor >> 8 & 0xFF;
* - * ( end auto-generated ) * * @webref color:creating_reading + * @webBrief Extracts the green value from a color, scaled to match current colorMode(). * @usage web_application * @param rgb any value of the color datatype * @see PGraphics#red(int) @@ -7972,7 +8033,6 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from blue.xml ) * * Extracts the blue value from a color, scaled to match current * colorMode(). This value is always returned as a float so be @@ -7984,9 +8044,9 @@ public class PGraphics extends PImage implements PConstants { * equivalent:
float r1 = blue(myColor);
float r2 = myColor * & 0xFF;
* - * ( end auto-generated ) * * @webref color:creating_reading + * @webBrief Extracts the blue value from a color, scaled to match current colorMode(). * @usage web_application * @param rgb any value of the color datatype * @see PGraphics#red(int) @@ -8005,12 +8065,11 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from hue.xml ) * * Extracts the hue value from a color. * - * ( end auto-generated ) * @webref color:creating_reading + * @webBrief Extracts the hue value from a color. * @usage web_application * @param rgb any value of the color datatype * @see PGraphics#red(int) @@ -8031,12 +8090,11 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from saturation.xml ) * * Extracts the saturation value from a color. * - * ( end auto-generated ) * @webref color:creating_reading + * @webBrief Extracts the saturation value from a color. * @usage web_application * @param rgb any value of the color datatype * @see PGraphics#red(int) @@ -8057,13 +8115,12 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from brightness.xml ) * * Extracts the brightness value from a color. * - * ( end auto-generated ) * * @webref color:creating_reading + * @webBrief Extracts the brightness value from a color. * @usage web_application * @param rgb any value of the color datatype * @see PGraphics#red(int) @@ -8092,16 +8149,15 @@ public class PGraphics extends PImage implements PConstants { /** - * ( begin auto-generated from lerpColor.xml ) * * Calculates a color or colors between two color at a specific increment. * The amt parameter is the amount to interpolate between the two * values where 0.0 equal to the first point, 0.1 is very near the first * point, 0.5 is half-way in between, etc. * - * ( end auto-generated ) * * @webref color:creating_reading + * @webBrief Calculates a color or colors between two color at a specific increment. * @usage web_application * @param c1 interpolate from this color * @param c2 interpolate to this color diff --git a/core/src/processing/core/PImage.java b/core/src/processing/core/PImage.java index ea561c95a..05668d401 100644 --- a/core/src/processing/core/PImage.java +++ b/core/src/processing/core/PImage.java @@ -35,7 +35,6 @@ import processing.awt.ShimAWT; /** - * ( begin auto-generated from PImage.xml ) * * Datatype for storing images. Processing can display .gif, * .jpg, .tga, and .png images. Images may be @@ -51,9 +50,9 @@ import processing.awt.ShimAWT; *
create a new image, use the createImage() function. Do not * use the syntax new PImage(). * - * ( end auto-generated ) * * @webref image + * @webBrief Datatype for storing images. * @usage Web & Application * @instanceName pimg any object of type PImage * @see PApplet#loadImage(String) @@ -81,7 +80,6 @@ public class PImage implements PConstants, Cloneable { public int format; /** - * ( begin auto-generated from pixels.xml ) * * Array containing the values for all the pixels in the display window. * These values are of the color datatype. This array is the size of the @@ -98,11 +96,10 @@ public class PImage implements PConstants, Cloneable { * Without loadPixels(), running the code may (or will in future * releases) result in a NullPointerException. * - * ( end auto-generated ) * * @webref image:pixels + * @webBrief Array containing the color of every pixel in the image. * @usage web_application - * @brief Array containing the color of every pixel in the image */ public int[] pixels; @@ -114,26 +111,22 @@ public class PImage implements PConstants, Cloneable { public int pixelHeight; /** - * ( begin auto-generated from PImage_width.xml ) * * The width of the image in units of pixels. * - * ( end auto-generated ) * @webref pimage:field + * @webBrief The width of the image in units of pixels. * @usage web_application - * @brief Image width */ public int width; /** - * ( begin auto-generated from PImage_height.xml ) * * The height of the image in units of pixels. * - * ( end auto-generated ) * @webref pimage:field + * @webBrief The height of the image in units of pixels. * @usage web_application - * @brief Image height */ public int height; @@ -206,7 +199,6 @@ public class PImage implements PConstants, Cloneable { *

* To create a new image, use the createImage() function (do not use * new PImage()). - * ( end auto-generated ) * @nowebref * @usage web_application * @see PApplet#loadImage(String, String) @@ -384,7 +376,6 @@ public class PImage implements PConstants, Cloneable { /** - * ( begin auto-generated from PImage_loadPixels.xml ) * * Loads the pixel data for the image into its pixels[] array. This * function must always be called before reading from or writing to pixels[]. @@ -396,7 +387,6 @@ public class PImage implements PConstants, Cloneable { * function in the current Processing release, this will always be subject * to change. * - * ( end auto-generated ) * *

Advanced

* Call this when you want to mess with the pixels[] array. @@ -405,7 +395,7 @@ public class PImage implements PConstants, Cloneable { * this should copy all data into the pixels[] array * * @webref pimage:pixels - * @brief Loads the pixel data for the image into its pixels[] array + * @webBrief Loads the pixel data for the image into its pixels[] array. * @usage web_application */ public void loadPixels() { // ignore @@ -422,7 +412,6 @@ public class PImage implements PConstants, Cloneable { /** - * ( begin auto-generated from PImage_updatePixels.xml ) * * Updates the image with the data in its pixels[] array. Use in * conjunction with loadPixels(). If you're only reading pixels from @@ -438,14 +427,13 @@ public class PImage implements PConstants, Cloneable { * Currently, none of the renderers use the additional parameters to * updatePixels(), however this may be implemented in the future. * - * ( end auto-generated ) *

Advanced

* Mark the pixels in this region as needing an update. * This is not currently used by any of the renderers, however the api * is structured this way in the hope of being able to use this to * speed things up in the future. * @webref pimage:pixels - * @brief Updates the image with the data in its pixels[] array + * @webBrief Updates the image with the data in its pixels[] array. * @usage web_application * @param x x-coordinate of the upper-left corner * @param y y-coordinate of the upper-left corner @@ -497,7 +485,6 @@ public class PImage implements PConstants, Cloneable { /** - * ( begin auto-generated from PImage_resize.xml ) * * Resize the image to a new width and height. To make the image scale * proportionally, use 0 as the value for the wide or high @@ -511,9 +498,8 @@ public class PImage implements PConstants, Cloneable { * content, first get a copy of its image data using the get() * method, and call resize() on the PImage that is returned. * - * ( end auto-generated ) * @webref pimage:method - * @brief Changes the size of an image to a new width and height + * @webBrief Resize the image to a new width and height. * @usage web_application * @param w the resized image width * @param h the resized image height @@ -550,7 +536,6 @@ public class PImage implements PConstants, Cloneable { /** - * ( 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 @@ -571,7 +556,6 @@ public class PImage implements PConstants, Cloneable { * equivalent statement to get(x, y) using pixels[] is * pixels[y*width+x]. See the reference for pixels[] for more information. * - * ( end auto-generated ) * *

Advanced

* Returns an ARGB "color" type (a packed 32 bit int with the color. @@ -592,7 +576,7 @@ public class PImage implements PConstants, Cloneable { * pixels[] array directly. * * @webref image:pixels - * @brief Reads the color of any pixel or grabs a rectangle of pixels + * @webBrief Reads the color of any pixel or grabs a rectangle of pixels. * @usage web_application * @param x x-coordinate of the pixel * @param y y-coordinate of the pixel @@ -709,7 +693,6 @@ public class PImage implements PConstants, Cloneable { /** - * ( begin auto-generated from PImage_set.xml ) * * Changes the color of any pixel or writes an image directly into the * display window.
@@ -727,10 +710,9 @@ public class PImage implements PConstants, Cloneable { * is pixels[y*width+x] = #000000. See the reference for * pixels[] for more information. * - * ( end auto-generated ) * * @webref image:pixels - * @brief writes a color to any pixel or writes an image into another + * @webBrief Writes a color to any pixel or writes an image into another * @usage web_application * @param x x-coordinate of the pixel * @param y y-coordinate of the pixel @@ -831,7 +813,6 @@ public class PImage implements PConstants, Cloneable { /** - * ( begin auto-generated from PImage_mask.xml ) * * Masks part of an image from displaying by loading another image and * using it as an alpha channel. This mask image should only contain @@ -844,7 +825,6 @@ public class PImage implements PConstants, Cloneable { * same length as the target image's pixels array and should contain only * grayscale data of values between 0-255. * - * ( end auto-generated ) * *

Advanced

* @@ -861,9 +841,9 @@ public class PImage implements PConstants, Cloneable { * performing a proper luminance-based conversion. * * @webref pimage:method + * @webBrief Masks part of an image with another image as an alpha channel * @usage web_application * @param img image to use as the mask - * @brief Masks part of an image with another image as an alpha channel */ public void mask(PImage img) { img.loadPixels(); @@ -949,7 +929,6 @@ public class PImage implements PConstants, Cloneable { /** - * ( begin auto-generated from PImage_filter.xml ) * * Filters an image as defined by one of the following modes:

THRESHOLD - converts the image to black and white pixels depending if @@ -975,7 +954,6 @@ public class PImage implements PConstants, Cloneable { *
* DILATE - increases the light areas with the amount defined by the level parameter * - * ( end auto-generated ) * *

Advanced

* Method to apply a variety of basic filters to this image. @@ -996,7 +974,7 @@ public class PImage implements PConstants, Cloneable { * Mario Klingemann * * @webref image:pixels - * @brief Converts the image to grayscale or black and white + * @webBrief Converts the image to grayscale or black and white * @usage web_application * @param kind Either THRESHOLD, GRAY, OPAQUE, INVERT, POSTERIZE, BLUR, ERODE, or DILATE * @param param unique for each, see above @@ -1501,7 +1479,6 @@ public class PImage implements PConstants, Cloneable { /** - * ( begin auto-generated from PImage_copy.xml ) * * Copies a region of pixels from one image into another. If the source and * destination regions aren't the same size, it will automatically resize @@ -1511,10 +1488,9 @@ public class PImage implements PConstants, Cloneable { *

* As of release 0149, this function ignores imageMode(). * - * ( end auto-generated ) * * @webref image:pixels - * @brief Copies the entire image + * @webBrief Copies the entire image * @usage web_application * @param sx X coordinate of the source's upper left corner * @param sy Y coordinate of the source's upper left corner @@ -1550,13 +1526,11 @@ public class PImage implements PConstants, Cloneable { /** - * ( begin auto-generated from blendColor.xml ) * * Blends two color values together based on the blending mode given as the * MODE parameter. The possible modes are described in the reference * for the blend() function. * - * ( end auto-generated ) *

Advanced

*