mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Fixing formatting in comments
This commit is contained in:
@@ -644,8 +644,8 @@ public class PApplet implements PConstants {
|
||||
/**
|
||||
*
|
||||
* Confirms if a Processing program is "focused", meaning that it is active
|
||||
* and will accept input from mouse or keyboard. This variable is "true" if
|
||||
* it is focused and "false" if not.
|
||||
* and will accept input from mouse or keyboard. This variable is <b>true</b> if
|
||||
* it is focused and <b>false</b> if not.
|
||||
*
|
||||
* @webref environment
|
||||
* @webBrief Confirms if a Processing program is "focused".
|
||||
@@ -1077,23 +1077,23 @@ public class PApplet implements PConstants {
|
||||
* pixels on high resolutions screens like Apple Retina
|
||||
* displays and Windows High-DPI displays. This function
|
||||
* can only be run once within a program and it must be
|
||||
* used right after size() in a program without a setup()
|
||||
* and used within setup() when a program has one. The
|
||||
* pixelDensity() should only be used with hardcoded
|
||||
* used right after <b>size()</b> in a program without a <b>setup()</b>
|
||||
* and used within <b>setup()</b> when a program has one. The
|
||||
* <b>pixelDensity()</b> should only be used with hardcoded
|
||||
* numbers (in almost all cases this number will be 2)
|
||||
* or in combination with displayDensity() as in the
|
||||
* or in combination with <b>displayDensity()</b> as in the
|
||||
* third example above.
|
||||
*
|
||||
* When the pixel density is set to more than 1, it
|
||||
* changes all of the pixel operations including the way
|
||||
* get(), set(), blend(), copy(), and updatePixels()
|
||||
* all work. See the reference for pixelWidth and
|
||||
* <b>get()</b>, <b>set()</b>, <b>blend()</b>, <b>copy()</b>, and <b>updatePixels()</b>
|
||||
* all work. See the reference for <b>pixelWidth</b> and
|
||||
* pixelHeight for more information.
|
||||
*
|
||||
* To use variables as the arguments to pixelDensity()
|
||||
* function, place the pixelDensity() function within
|
||||
* the settings() function. There is more information
|
||||
* about this on the settings() reference page.
|
||||
* To use variables as the arguments to <b>pixelDensity()</b>
|
||||
* function, place the <b>pixelDensity()</b> function within
|
||||
* the <b>settings()</b> function. There is more information
|
||||
* about this on the <b>settings()</b> reference page.
|
||||
*
|
||||
* @webref environment
|
||||
* @webBrief It makes it possible for Processing to render using all of the
|
||||
@@ -1151,36 +1151,36 @@ public class PApplet implements PConstants {
|
||||
|
||||
/**
|
||||
* Draws all geometry with smooth (anti-aliased) edges.
|
||||
* This behavior is the default, so smooth() only needs
|
||||
* This behavior is the default, so <b>smooth()</b> only needs
|
||||
* to be used when a program needs to set the smoothing
|
||||
* in a different way. The level parameter increases
|
||||
* the amount of smoothness. This is the level of over
|
||||
* sampling applied to the graphics buffer.
|
||||
*
|
||||
* With the P2D and P3D renderers, smooth(2) is the
|
||||
* With the P2D and P3D renderers, <b>smooth(2)</b> is the
|
||||
* default, this is called "2x anti-aliasing." The code
|
||||
* smooth(4) is used for 4x anti-aliasing and smooth(8)
|
||||
* <b>smooth(4)</b> is used for 4x anti-aliasing and <b>smooth(8)</b>
|
||||
* is specified for "8x anti-aliasing." The maximum
|
||||
* anti-aliasing level is determined by the hardware of
|
||||
* the machine that is running the software, so smooth(4)
|
||||
* and smooth(8) will not work with every computer.
|
||||
* the machine that is running the software, so <b>smooth(4)</b>
|
||||
* and <b>smooth(8)</b> will not work with every computer.
|
||||
*
|
||||
* The default renderer uses smooth(3) by default. This
|
||||
* The default renderer uses <b>smooth(3)</b> by default. This
|
||||
* is bicubic smoothing. The other option for the default
|
||||
* renderer is smooth(2), which is bilinear smoothing.
|
||||
* renderer is <b>smooth(2)</b>, which is bilinear smoothing.
|
||||
*
|
||||
* With Processing 3.0, smooth() is different than before.
|
||||
* It was common to use smooth() and noSmooth() to turn on
|
||||
* With Processing 3.0, <b>smooth()</b> is different than before.
|
||||
* It was common to use <b>smooth()</b> and <b>noSmooth()</b> to turn on
|
||||
* and off antialiasing within a sketch. Now, because of
|
||||
* how the software has changed, smooth() can only be set
|
||||
* how the software has changed, <b>smooth()</b> can only be set
|
||||
* once within a sketch. It can be used either at the top
|
||||
* of a sketch without a setup(), or after the size()
|
||||
* function when used in a sketch with setup(). The
|
||||
* noSmooth() function also follows the same rules.
|
||||
* of a sketch without a <b>setup()</b>, or after the <b>size()</b>
|
||||
* function when used in a sketch with <b>setup()</b>. The
|
||||
* <b>noSmooth()</b> function also follows the same rules.
|
||||
*
|
||||
* When smooth() is used with a PGraphics object, it should
|
||||
* When <b>smooth()</b> is used with a PGraphics object, it should
|
||||
* be run right after the object is created with
|
||||
* createGraphics(), as shown in the Reference in the third
|
||||
* <b>createGraphics()</b>, as shown in the Reference in the third
|
||||
* example.
|
||||
*
|
||||
* @webref environment
|
||||
@@ -1200,13 +1200,13 @@ public class PApplet implements PConstants {
|
||||
* Draws all geometry and fonts with jagged (aliased)
|
||||
* edges and images with hard edges between the pixels
|
||||
* when enlarged rather than interpolating pixels. Note
|
||||
* that smooth() is active by default, so it is necessary
|
||||
* to call noSmooth() to disable smoothing of geometry,
|
||||
* that <b>smooth()</b> is active by default, so it is necessary
|
||||
* to call <b>noSmooth()<b> to disable smoothing of geometry,
|
||||
* fonts, and images. Since the release of Processing 3.0,
|
||||
* the noSmooth() function can only be run once for each
|
||||
* sketch, either at the top of a sketch without a setup(),
|
||||
* or after the size() function when used in a sketch with
|
||||
* setup(). See the examples above for both scenarios.
|
||||
* the <b>noSmooth()</b> function can only be run once for each
|
||||
* sketch, either at the top of a sketch without a <b>setup()</b>,
|
||||
* or after the <b>size()</b> function when used in a sketch with
|
||||
* <b>setup()</b>. See the examples above for both scenarios.
|
||||
*
|
||||
* @webref environment
|
||||
* @webBrief Draws all geometry and fonts with jagged (aliased)
|
||||
@@ -3391,22 +3391,22 @@ public class PApplet implements PConstants {
|
||||
|
||||
/**
|
||||
*
|
||||
* The delay() function causes the program to halt for a specified time.
|
||||
* The <b>delay()</b> function causes the program to halt for a specified time.
|
||||
* Delay times are specified in thousandths of a second. For example,
|
||||
* running delay(3000) will stop the program for three seconds and
|
||||
* delay(500) will stop the program for a half-second.
|
||||
* running <b>delay(3000)</b> will stop the program for three seconds and
|
||||
* <b>delay(500)</b> will stop the program for a half-second.
|
||||
*
|
||||
* The screen only updates when the end of draw() is reached, so delay()
|
||||
* cannot be used to slow down drawing. For instance, you cannot use delay()
|
||||
* The screen only updates when the end of <b>draw()</b> is reached, so <b>delay()</b>
|
||||
* cannot be used to slow down drawing. For instance, you cannot use <b>delay()</b>
|
||||
* to control the timing of an animation.
|
||||
*
|
||||
* The delay() function should only be used for pausing scripts (i.e.
|
||||
* The <b>delay()</b> function should only be used for pausing scripts (i.e.
|
||||
* a script that needs to pause a few seconds before attempting a download,
|
||||
* or a sketch that needs to wait a few milliseconds before reading from
|
||||
* the serial port).
|
||||
*
|
||||
* @webref environment
|
||||
* @webBrief The delay() function causes the program to halt for a specified time.
|
||||
* @webBrief The <b>delay()</b> function causes the program to halt for a specified time.
|
||||
* @param napTime milliseconds to pause before running draw() again
|
||||
* @see PApplet#frameRate
|
||||
* @see PApplet#draw()
|
||||
@@ -4368,7 +4368,7 @@ public class PApplet implements PConstants {
|
||||
|
||||
/**
|
||||
*
|
||||
* The printArray() function writes array data to the text
|
||||
* The <b>printArray()</b> function writes array data to the text
|
||||
* area of the Processing environment's console. A new line
|
||||
* is put between each element of the array. This function
|
||||
* can only print one dimensional arrays.
|
||||
@@ -4378,7 +4378,7 @@ public class PApplet implements PConstants {
|
||||
*
|
||||
*
|
||||
* @webref output:text_area
|
||||
* @webBrief The printArray() function writes array data to the text
|
||||
* @webBrief Writes array data to the text
|
||||
* area of the Processing environment's console.
|
||||
* @param what one-dimensional array
|
||||
* @usage IDE
|
||||
@@ -4521,7 +4521,7 @@ public class PApplet implements PConstants {
|
||||
*
|
||||
* Squares a number (multiplies a number by itself). The result is always a
|
||||
* positive number, as multiplying two negative numbers always yields a
|
||||
* positive result. For example, -1 * -1 = 1.
|
||||
* positive result. For example, <b>-1 * -1 = 1.</b>
|
||||
*
|
||||
* @webref math:calculation
|
||||
* @webBrief Squares a number (multiplies a number by itself).
|
||||
@@ -5011,7 +5011,7 @@ public class PApplet implements PConstants {
|
||||
* direction in space commonly used in computer graphics and linear
|
||||
* algebra. Because it has no "start" position, the magnitude of a vector
|
||||
* can be thought of as the distance from coordinate (0,0) to its (x,y)
|
||||
* value. Therefore, mag() is a shortcut for writing "dist(0, 0, x, y)".
|
||||
* value. Therefore, <b>mag()</b> is a shortcut for writing <b>dist(0, 0, x, y)</b>.
|
||||
*
|
||||
* @webref math:calculation
|
||||
* @webBrief Calculates the magnitude (or length) of a vector.
|
||||
@@ -10389,7 +10389,7 @@ public class PApplet implements PConstants {
|
||||
* where 0.0 is equal to the first point, 0.1 is very near the first point,
|
||||
* 0.5 is halfway in between, etc. <br />
|
||||
* An amount below 0 will be treated as 0. Likewise, amounts above 1 will be
|
||||
* capped at 1. This is different from the behavior of lerp(), but necessary
|
||||
* capped at 1. This is different from the behavior of <b>lerp()</b>, but necessary
|
||||
* because otherwise numbers outside the range will produce strange and
|
||||
* unexpected colors.
|
||||
*
|
||||
@@ -12010,7 +12010,7 @@ public class PApplet implements PConstants {
|
||||
*
|
||||
* 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
|
||||
* ninety degrees. The first pair of parameters (x1,y1) sets the first
|
||||
* ninety degrees. The first pair of parameters <b>(x1,y1)</b> sets the first
|
||||
* vertex and the subsequent pairs should proceed clockwise or
|
||||
* counter-clockwise around the defined shape.
|
||||
*
|
||||
@@ -14012,7 +14012,7 @@ public class PApplet implements PConstants {
|
||||
* the clipping volume where left and right are the minimum and maximum x
|
||||
* values, top and bottom are the minimum and maximum y values, and near and far
|
||||
* are the minimum and maximum z values. If no parameters are given, the default
|
||||
* is used: ortho(-width/2, width/2, -height/2, height/2).
|
||||
* is used: <b>ortho(-width/2, width/2, -height/2, height/2)</b>.
|
||||
*
|
||||
*
|
||||
* @webref lights_camera:camera
|
||||
@@ -14060,8 +14060,8 @@ public class PApplet implements PConstants {
|
||||
* accurately than orthographic projection. The version of perspective
|
||||
* without parameters sets the default perspective and the version with
|
||||
* four parameters allows the programmer to set the area precisely. The
|
||||
* 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));
|
||||
* default values are: <b>perspective(PI/3.0, width/height, cameraZ/10.0,
|
||||
* cameraZ*10.0)</b> where cameraZ is <b>((height/2.0) / tan(PI*60.0/360.0));</b>
|
||||
*
|
||||
*
|
||||
* @webref lights_camera:camera
|
||||
@@ -14233,8 +14233,8 @@ public class PApplet implements PConstants {
|
||||
* In the example, the <b>modelX()</b>, <b>modelY()</b>, and
|
||||
* <b>modelZ()</b> functions record the location of a box in space after
|
||||
* being placed using a series of translate and rotate commands. After
|
||||
* popMatrix() is called, those transformations no longer apply, but the
|
||||
* (x, y, z) coordinate returned by the model functions is used to place
|
||||
* <b>popMatrix()</b> is called, those transformations no longer apply, but the
|
||||
* <b>(x, y, z)</b> coordinate returned by the model functions is used to place
|
||||
* another box in the same location.
|
||||
*
|
||||
*
|
||||
@@ -14262,8 +14262,8 @@ public class PApplet implements PConstants {
|
||||
* In the example, the <b>modelX()</b>, <b>modelY()</b>, and
|
||||
* <b>modelZ()</b> functions record the location of a box in space after
|
||||
* being placed using a series of translate and rotate commands. After
|
||||
* popMatrix() is called, those transformations no longer apply, but the
|
||||
* (x, y, z) coordinate returned by the model functions is used to place
|
||||
* <b>popMatrix()</b> is called, those transformations no longer apply, but the
|
||||
* <b>(x, y, z)</b> coordinate returned by the model functions is used to place
|
||||
* another box in the same location.
|
||||
*
|
||||
*
|
||||
@@ -14291,8 +14291,8 @@ public class PApplet implements PConstants {
|
||||
* In the example, the <b>modelX()</b>, <b>modelY()</b>, and
|
||||
* <b>modelZ()</b> functions record the location of a box in space after
|
||||
* being placed using a series of translate and rotate commands. After
|
||||
* popMatrix() is called, those transformations no longer apply, but the
|
||||
* (x, y, z) coordinate returned by the model functions is used to place
|
||||
* <b>popMatrix()</b> is called, those transformations no longer apply, but the
|
||||
* <b>(x, y, z)</b> coordinate returned by the model functions is used to place
|
||||
* another box in the same location.
|
||||
*
|
||||
*
|
||||
@@ -14321,10 +14321,10 @@ public class PApplet implements PConstants {
|
||||
* <br /><br />
|
||||
* The style information controlled by the following functions are included
|
||||
* in the style:
|
||||
* fill(), stroke(), tint(), strokeWeight(), strokeCap(), strokeJoin(),
|
||||
* imageMode(), rectMode(), ellipseMode(), shapeMode(), colorMode(),
|
||||
* textAlign(), textFont(), textMode(), textSize(), textLeading(),
|
||||
* emissive(), specular(), shininess(), ambient()
|
||||
* <b>fill()<b>, <b>stroke()</b>, <b>tint()</b>, <b>strokeWeight()</b>, <b>strokeCap()</b>,<b>strokeJoin()</b>,
|
||||
* <b>imageMode()</b>, <b>rectMode()</b>, <b>ellipseMode()</b>, <b>shapeMode()</b>, <b>colorMode()</b>,
|
||||
* <b>textAlign()</b>, <b>textFont()</b>, <b>textMode()</b>, <b>textSize()</b>, <b>textLeading()</b>,
|
||||
* <b>emissive()</b>, <b>specular()</b>, <b>shininess()</b>, <b>ambient()</b>
|
||||
*
|
||||
*
|
||||
* @webref structure
|
||||
@@ -14369,7 +14369,7 @@ public class PApplet implements PConstants {
|
||||
* Sets the width of the stroke used for lines, points, and the border around
|
||||
* shapes. All widths are set in units of pixels. <br />
|
||||
* <br />
|
||||
* Using point() with strokeWeight(1) or smaller may draw nothing to the screen,
|
||||
* Using <b>point()<b> with <b>strokeWeight(1)<b> or smaller may draw nothing to the screen,
|
||||
* depending on the graphics settings of the computer. Workarounds include
|
||||
* setting the pixel using <b>set()</s> or drawing the point using either
|
||||
* <b>circle()</b> or <b>square()</b>.
|
||||
@@ -14471,7 +14471,7 @@ public class PApplet implements PConstants {
|
||||
* <br />
|
||||
* When drawing in 2D with the default renderer, you may need
|
||||
* <b>hint(ENABLE_STROKE_PURE)</b> to improve drawing quality (at the expense of
|
||||
* performance). See the hint() documentation for more details.
|
||||
* performance). See the <b>hint()</b> documentation for more details.
|
||||
*
|
||||
* @webref color:setting
|
||||
* @webBrief Sets the color used to draw lines and borders around shapes.
|
||||
@@ -14893,10 +14893,10 @@ public class PApplet implements PConstants {
|
||||
/**
|
||||
*
|
||||
* Sets the default ambient light, directional light, falloff, and specular
|
||||
* values. The defaults are ambientLight(128, 128, 128) and
|
||||
* directionalLight(128, 128, 128, 0, 0, -1), lightFalloff(1, 0, 0), and
|
||||
* lightSpecular(0, 0, 0). Lights need to be included in the draw() to
|
||||
* remain persistent in a looping program. Placing them in the setup() of a
|
||||
* values. The defaults are <b>ambientLight(128, 128, 128)</b> and
|
||||
* <b>directionalLight(128, 128, 128, 0, 0, -1)</b>, </b>lightFalloff(1, 0, 0)</b>, and
|
||||
* <b>lightSpecular(0, 0, 0)</b>. Lights need to be included in the <b>draw()</b> to
|
||||
* remain persistent in a looping program. Placing them in the <b>setup()</b> of a
|
||||
* looping program will cause them to only have an effect the first time
|
||||
* through the loop.
|
||||
*
|
||||
@@ -15906,16 +15906,16 @@ public class PApplet implements PConstants {
|
||||
* of the following modes to blend the colors of source pixels (A) with the
|
||||
* ones of pixels in the destination image (B):<br />
|
||||
* <br />
|
||||
* BLEND - linear interpolation of colours: C = A*factor + B<br />
|
||||
* BLEND - linear interpolation of colours: <b>C = A*factor + B</b><br />
|
||||
* <br />
|
||||
* ADD - additive blending with white clip: C = min(A*factor + B, 255)<br />
|
||||
* ADD - additive blending with white clip: <b>C = min(A*factor + B, 255)</b><br />
|
||||
* <br />
|
||||
* SUBTRACT - subtractive blending with black clip: C = max(B - A*factor,
|
||||
* 0)<br />
|
||||
* SUBTRACT - subtractive blending with black clip: <b>C = max(B - A*factor,
|
||||
* 0)</b><br />
|
||||
* <br />
|
||||
* DARKEST - only the darkest colour succeeds: C = min(A*factor, B)<br />
|
||||
* DARKEST - only the darkest colour succeeds: <b>C = min(A*factor, B)</b><br />
|
||||
* <br />
|
||||
* LIGHTEST - only the lightest colour succeeds: C = max(A*factor, B)<br />
|
||||
* LIGHTEST - only the lightest colour succeeds: <b>C = max(A*factor, B)</b><br />
|
||||
* <br />
|
||||
* DIFFERENCE - subtract colors from underlying image.<br />
|
||||
* <br />
|
||||
|
||||
@@ -871,7 +871,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
|
||||
/**
|
||||
*
|
||||
* Sets the default properties for a PGraphics object. It should be called
|
||||
* Sets the default properties for a <b>PGraphics</b> object. It should be called
|
||||
* before anything is drawn into the object.
|
||||
*
|
||||
* <h3>Advanced</h3>
|
||||
@@ -879,7 +879,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* drawing anything.
|
||||
*
|
||||
* @webref pgraphics:method
|
||||
* @webBrief Sets the default properties for a PGraphics object.
|
||||
* @webBrief Sets the default properties for a <b>PGraphics</b> object.
|
||||
*/
|
||||
public void beginDraw() { // ignore
|
||||
}
|
||||
@@ -887,7 +887,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
|
||||
/**
|
||||
*
|
||||
* Finalizes the rendering of a PGraphics object so that it can be shown on screen.
|
||||
* Finalizes the rendering of a <b>PGraphics</b> object so that it can be shown on screen.
|
||||
*
|
||||
* <h3>Advanced</h3>
|
||||
* <p/>
|
||||
@@ -895,7 +895,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* you're finished drawing.
|
||||
*
|
||||
* @webref pgraphics:method
|
||||
* @webBrief Finalizes the rendering of a PGraphics object so that it can be shown on screen.
|
||||
* @webBrief Finalizes the rendering of a <b>PGraphics</b> object so that it can be shown on screen.
|
||||
* @brief Finalizes the rendering of a PGraphics object
|
||||
*/
|
||||
public void endDraw() { // ignore
|
||||
@@ -1068,64 +1068,64 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* manner across renderers. Many options will often graduate to standard
|
||||
* features instead of hints over time.
|
||||
* <br/> <br/>
|
||||
* hint(ENABLE_OPENGL_4X_SMOOTH) - Enable 4x anti-aliasing for P3D. This
|
||||
* <b>hint(ENABLE_OPENGL_4X_SMOOTH)</b>- Enable 4x anti-aliasing for P3D. This
|
||||
* can help force anti-aliasing if it has not been enabled by the user. On
|
||||
* some graphics cards, this can also be set by the graphics driver's
|
||||
* control panel, however not all cards make this available. This hint must
|
||||
* be called immediately after the size() command because it resets the
|
||||
* renderer, obliterating any settings and anything drawn (and like size(),
|
||||
* be called immediately after the <b>size()</b> command because it resets the
|
||||
* renderer, obliterating any settings and anything drawn (and like <b>size()</b>,
|
||||
* re-running the code that came before it again).
|
||||
* <br/> <br/>
|
||||
* hint(DISABLE_OPENGL_2X_SMOOTH) - In Processing 1.0, Processing always
|
||||
* <b>hint(DISABLE_OPENGL_2X_SMOOTH)</b> - In Processing 1.0, Processing always
|
||||
* enables 2x smoothing when the P3D renderer is used. This hint disables
|
||||
* the default 2x smoothing and returns the smoothing behavior found in
|
||||
* earlier releases, where smooth() and noSmooth() could be used to enable
|
||||
* earlier releases, where <b>smooth()</b> and <b>noSmooth()</b> could be used to enable
|
||||
* and disable smoothing, though the quality was inferior.
|
||||
* <br/> <br/>
|
||||
* hint(ENABLE_NATIVE_FONTS) - Use the native version fonts when they are
|
||||
* <b>hint(ENABLE_NATIVE_FONTS)</b> - Use the native version fonts when they are
|
||||
* installed, rather than the bitmapped version from a .vlw file. This is
|
||||
* useful with the default (or JAVA2D) renderer setting, as it will improve
|
||||
* font rendering speed. This is not enabled by default, because it can be
|
||||
* misleading while testing because the type will look great on your
|
||||
* machine (because you have the font installed) but lousy on others'
|
||||
* machines if the identical font is unavailable. This option can only be
|
||||
* set per-sketch, and must be called before any use of textFont().
|
||||
* set per-sketch, and must be called before any use of <b>textFont()</b>.
|
||||
* <br/> <br/>
|
||||
* hint(DISABLE_DEPTH_TEST) - Disable the zbuffer, allowing you to draw on
|
||||
* <b>hint(DISABLE_DEPTH_TEST)</b> - Disable the zbuffer, allowing you to draw on
|
||||
* top of everything at will. When depth testing is disabled, items will be
|
||||
* drawn to the screen sequentially, like a painting. This hint is most
|
||||
* often used to draw in 3D, then draw in 2D on top of it (for instance, to
|
||||
* draw GUI controls in 2D on top of a 3D interface). Starting in release
|
||||
* 0149, this will also clear the depth buffer. Restore the default with
|
||||
* hint(ENABLE_DEPTH_TEST), but note that with the depth buffer cleared,
|
||||
* any 3D drawing that happens later in draw() will ignore existing shapes
|
||||
* <b>hint(ENABLE_DEPTH_TEST)</b>, but note that with the depth buffer cleared,
|
||||
* any 3D drawing that happens later in <b>draw()</b> will ignore existing shapes
|
||||
* on the screen.
|
||||
* <br/> <br/>
|
||||
* hint(ENABLE_DEPTH_SORT) - Enable primitive z-sorting of triangles and
|
||||
* <b>hint(ENABLE_DEPTH_SORT)</b> - Enable primitive z-sorting of triangles and
|
||||
* lines in P3D and OPENGL. This can slow performance considerably, and the
|
||||
* algorithm is not yet perfect. Restore the default with hint(DISABLE_DEPTH_SORT).
|
||||
* algorithm is not yet perfect. Restore the default with <b>hint(DISABLE_DEPTH_SORT)</b>.
|
||||
* <br/> <br/>
|
||||
* hint(DISABLE_OPENGL_ERROR_REPORT) - Speeds up the P3D renderer setting
|
||||
* by not checking for errors while running. Undo with hint(ENABLE_OPENGL_ERROR_REPORT).
|
||||
* <b>hint(DISABLE_OPENGL_ERROR_REPORT)</b> - Speeds up the P3D renderer setting
|
||||
* by not checking for errors while running. Undo with <b>hint(ENABLE_OPENGL_ERROR_REPORT)</b>.
|
||||
* <br/> <br/>
|
||||
* hint(ENABLE_BUFFER_READING) - Depth and stencil buffers in P2D/P3D will be
|
||||
* <b>hint(ENABLE_BUFFER_READING)</b> - Depth and stencil buffers in P2D/P3D will be
|
||||
* down-sampled to make PGL#readPixels work with multisampling. Enabling this
|
||||
* introduces some overhead, so if you experience bad performance, disable
|
||||
* multisampling with noSmooth() instead. This hint is not intended to be
|
||||
* enabled and disabled repeatedly, so call this once in setup() or after
|
||||
* multisampling with <b>noSmooth()</b> instead. This hint is not intended to be
|
||||
* enabled and disabled repeatedly, so call this once in <b>setup()</b> or after
|
||||
* creating your PGraphics2D/3D. You can restore the default with
|
||||
* hint(DISABLE_BUFFER_READING) if you don't plan to read depth from
|
||||
* this PGraphics anymore.
|
||||
* <b>hint(DISABLE_BUFFER_READING)</b> if you don't plan to read depth from
|
||||
* this <b>PGraphics</b> anymore.
|
||||
* <br/> <br/>
|
||||
* hint(ENABLE_KEY_REPEAT) - Auto-repeating key events are discarded
|
||||
* <b>hint(ENABLE_KEY_REPEAT)</b> - Auto-repeating key events are discarded
|
||||
* by default (works only in P2D/P3D); use this hint to get all the key events
|
||||
* (including auto-repeated). Call hint(DISABLE_KEY_REPEAT) to get events
|
||||
* (including auto-repeated). Call <b>hint(DISABLE_KEY_REPEAT)</b> to get events
|
||||
* only when the key goes physically up or down.
|
||||
* <br/> <br/>
|
||||
* hint(DISABLE_ASYNC_SAVEFRAME) - P2D/P3D only - save() and saveFrame()
|
||||
* <b>hint(DISABLE_ASYNC_SAVEFRAME)</b> - P2D/P3D only - <b>save()</b> and <b>saveFrame()</b>
|
||||
* will not use separate threads for saving and will block until the image
|
||||
* is written to the drive. This was the default behavior in 3.0b7 and before.
|
||||
* To enable, call hint(ENABLE_ASYNC_SAVEFRAME).
|
||||
* To enable, call <b>hint(ENABLE_ASYNC_SAVEFRAME)</b>.
|
||||
*
|
||||
* @webref rendering
|
||||
* @webBrief Set various hints and hacks for the renderer.
|
||||
@@ -2107,15 +2107,15 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* channel of (A) and (B) independently. The red channel is compared with
|
||||
* red, green with green, and blue with blue.<br />
|
||||
* <br />
|
||||
* BLEND - linear interpolation of colors: C = A*factor + B. This is the default.<br />
|
||||
* BLEND - linear interpolation of colors: <b>C = A*factor + B</b>. This is the default.<br />
|
||||
* <br />
|
||||
* ADD - additive blending with white clip: C = min(A*factor + B, 255)<br />
|
||||
* ADD - additive blending with white clip: <b>C = min(A*factor + B, 255)</b><br />
|
||||
* <br />
|
||||
* SUBTRACT - subtractive blending with black clip: C = max(B - A*factor, 0)<br />
|
||||
* SUBTRACT - subtractive blending with black clip: <b>C = max(B - A*factor, 0)</b><br />
|
||||
* <br />
|
||||
* DARKEST - only the darkest color succeeds: C = min(A*factor, B)<br />
|
||||
* DARKEST - only the darkest color succeeds: <b>C = min(A*factor, B)</b><br />
|
||||
* <br />
|
||||
* LIGHTEST - only the lightest color succeeds: C = max(A*factor, B)<br />
|
||||
* LIGHTEST - only the lightest color succeeds: <b>C = max(A*factor, B)</b><br />
|
||||
* <br />
|
||||
* DIFFERENCE - subtract colors from underlying image.<br />
|
||||
* <br />
|
||||
@@ -5764,7 +5764,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* 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().
|
||||
* function in OpenGL is <b>glMultMatrix()</b>.
|
||||
*
|
||||
*
|
||||
* @webref transform
|
||||
@@ -6034,7 +6034,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* the clipping volume where left and right are the minimum and maximum x
|
||||
* values, top and bottom are the minimum and maximum y values, and near and far
|
||||
* are the minimum and maximum z values. If no parameters are given, the default
|
||||
* is used: ortho(-width/2, width/2, -height/2, height/2).
|
||||
* is used: <b>ortho(-width/2, width/2, -height/2, height/2)</b>.
|
||||
*
|
||||
*
|
||||
* @webref lights_camera:camera
|
||||
@@ -6076,8 +6076,8 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* accurately than orthographic projection. The version of perspective
|
||||
* without parameters sets the default perspective and the version with
|
||||
* four parameters allows the programmer to set the area precisely. The
|
||||
* 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));
|
||||
* default values are: <b>perspective(PI/3.0, width/height, cameraZ/10.0,
|
||||
* cameraZ*10.0)</b> where cameraZ is <b>((height/2.0) / tan(PI*60.0/360.0))</b>
|
||||
*
|
||||
*
|
||||
* @webref lights_camera:camera
|
||||
@@ -6254,8 +6254,8 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* In the example, the <b>modelX()</b>, <b>modelY()</b>, and
|
||||
* <b>modelZ()</b> functions record the location of a box in space after
|
||||
* being placed using a series of translate and rotate commands. After
|
||||
* popMatrix() is called, those transformations no longer apply, but the
|
||||
* (x, y, z) coordinate returned by the model functions is used to place
|
||||
* <b>popMatrix()</b> is called, those transformations no longer apply, but the
|
||||
* <b>(x, y, z)</b> coordinate returned by the model functions is used to place
|
||||
* another box in the same location.
|
||||
*
|
||||
*
|
||||
@@ -6284,8 +6284,8 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* In the example, the <b>modelX()</b>, <b>modelY()</b>, and
|
||||
* <b>modelZ()</b> functions record the location of a box in space after
|
||||
* being placed using a series of translate and rotate commands. After
|
||||
* popMatrix() is called, those transformations no longer apply, but the
|
||||
* (x, y, z) coordinate returned by the model functions is used to place
|
||||
* <b>popMatrix()</b> is called, those transformations no longer apply, but the
|
||||
* <b>(x, y, z)</b> coordinate returned by the model functions is used to place
|
||||
* another box in the same location.
|
||||
*
|
||||
*
|
||||
@@ -6314,8 +6314,8 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* In the example, the <b>modelX()</b>, <b>modelY()</b>, and
|
||||
* <b>modelZ()</b> functions record the location of a box in space after
|
||||
* being placed using a series of translate and rotate commands. After
|
||||
* popMatrix() is called, those transformations no longer apply, but the
|
||||
* (x, y, z) coordinate returned by the model functions is used to place
|
||||
* <b>popMatrix()</b> is called, those transformations no longer apply, but the
|
||||
* <b>(x, y, z)</b> coordinate returned by the model functions is used to place
|
||||
* another box in the same location.
|
||||
*
|
||||
*
|
||||
@@ -6350,10 +6350,10 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* <br /><br />
|
||||
* The style information controlled by the following functions are included
|
||||
* in the style:
|
||||
* fill(), stroke(), tint(), strokeWeight(), strokeCap(), strokeJoin(),
|
||||
* imageMode(), rectMode(), ellipseMode(), shapeMode(), colorMode(),
|
||||
* textAlign(), textFont(), textMode(), textSize(), textLeading(),
|
||||
* emissive(), specular(), shininess(), ambient()
|
||||
* <b>fill()<b>, <b>stroke()</b>, <b>tint()</b>, <b>strokeWeight()</b>, <b>strokeCap()</b>,<b>strokeJoin()</b>,
|
||||
* <b>imageMode()</b>, <b>rectMode()</b>, <b>ellipseMode()</b>, <b>shapeMode()</b>, <b>colorMode()</b>,
|
||||
* <b>textAlign()</b>, <b>textFont()</b>, <b>textMode()</b>, <b>textSize()</b>, <b>textLeading()</b>,
|
||||
* <b>emissive()</b>, <b>specular()</b>, <b>shininess()</b>, <b>ambient()</b>
|
||||
*
|
||||
*
|
||||
* @webref structure
|
||||
@@ -7169,10 +7169,10 @@ public class PGraphics extends PImage implements PConstants {
|
||||
/**
|
||||
*
|
||||
* Sets the default ambient light, directional light, falloff, and specular
|
||||
* values. The defaults are ambientLight(128, 128, 128) and
|
||||
* directionalLight(128, 128, 128, 0, 0, -1), lightFalloff(1, 0, 0), and
|
||||
* lightSpecular(0, 0, 0). Lights need to be included in the draw() to
|
||||
* remain persistent in a looping program. Placing them in the setup() of a
|
||||
* values. The defaults are <b>ambientLight(128, 128, 128)</b> and
|
||||
* <b>directionalLight(128, 128, 128, 0, 0, -1)</b>, <b>lightFalloff(1, 0, 0)</b>, and
|
||||
* <b>lightSpecular(0, 0, 0)</b>. Lights need to be included in the <b>draw()</b> to
|
||||
* remain persistent in a looping program. Placing them in the <b>setup()</b> of a
|
||||
* looping program will cause them to only have an effect the first time
|
||||
* through the loop.
|
||||
*
|
||||
@@ -8223,7 +8223,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* equal to the first point, 0.1 is very near the first point, 0.5 is halfway in
|
||||
* between, etc. <br />
|
||||
* An amount below 0 will be treated as 0. Likewise, amounts above 1 will be
|
||||
* capped at 1. This is different from the behavior of lerp(), but necessary
|
||||
* capped at 1. This is different from the behavior of <b>lerp()</b>, but necessary
|
||||
* because otherwise numbers outside the range will produce strange and
|
||||
* unexpected colors.
|
||||
*
|
||||
|
||||
@@ -83,7 +83,7 @@ public class PImage implements PConstants, Cloneable {
|
||||
|
||||
/**
|
||||
*
|
||||
* The pixels[] array contains the values for all the pixels in the image. These
|
||||
* The <b>pixels[]</b> array contains the values for all the pixels in the image. These
|
||||
* values are of the color datatype. This array is the size of the image,
|
||||
* meaning if the image is 100 x 100 pixels, there will be 10,000 values and if
|
||||
* the window is 200 x 300 pixels, there will be 60,000 values. <br />
|
||||
@@ -464,12 +464,12 @@ public class PImage implements PConstants, Cloneable {
|
||||
* Resize the image to a new width and height. To make the image scale
|
||||
* proportionally, use 0 as the value for the <b>wide</b> or <b>high</b>
|
||||
* parameter. For instance, to make the width of an image 150 pixels, and
|
||||
* change the height using the same proportion, use resize(150, 0).<br />
|
||||
* change the height using the same proportion, use <b>resize(150, 0)</b>.<br />
|
||||
* <br />
|
||||
* Even though a PGraphics is technically a PImage, it is not possible to
|
||||
* rescale the image data found in a PGraphics. (It's simply not possible
|
||||
* Even though a PGraphics is technically a <b>PImage</b>, it is not possible to
|
||||
* rescale the image data found in a <b>PGraphics</b>. (It's simply not possible
|
||||
* to do this consistently across renderers: technically infeasible with
|
||||
* P3D, or what would it even do with PDF?) If you want to resize PGraphics
|
||||
* P3D, or what would it even do with PDF?) If you want to resize <b>PGraphics</b>
|
||||
* content, first get a copy of its image data using the <b>get()</b>
|
||||
* method, and call <b>resize()</b> on the PImage that is returned.
|
||||
*
|
||||
@@ -1631,16 +1631,16 @@ public class PImage implements PConstants, Cloneable {
|
||||
* of the following modes to blend the colors of source pixels (A) with the
|
||||
* ones of pixels in the destination image (B):<br />
|
||||
* <br />
|
||||
* BLEND - linear interpolation of colours: C = A*factor + B<br />
|
||||
* BLEND - linear interpolation of colours: <b>C = A*factor + B</b><br />
|
||||
* <br />
|
||||
* ADD - additive blending with white clip: C = min(A*factor + B, 255)<br />
|
||||
* ADD - additive blending with white clip: <b>C = min(A*factor + B, 255)</b><br />
|
||||
* <br />
|
||||
* SUBTRACT - subtractive blending with black clip: C = max(B - A*factor,
|
||||
* 0)<br />
|
||||
* SUBTRACT - subtractive blending with black clip: <b>C = max(B - A*factor,
|
||||
* 0)</b><br />
|
||||
* <br />
|
||||
* DARKEST - only the darkest colour succeeds: C = min(A*factor, B)<br />
|
||||
* DARKEST - only the darkest colour succeeds: <b>C = min(A*factor, B)</b><br />
|
||||
* <br />
|
||||
* LIGHTEST - only the lightest colour succeeds: C = max(A*factor, B)<br />
|
||||
* LIGHTEST - only the lightest colour succeeds: <b>C = max(A*factor, B)</b><br />
|
||||
* <br />
|
||||
* DIFFERENCE - subtract colors from underlying image.<br />
|
||||
* <br />
|
||||
|
||||
@@ -145,7 +145,7 @@ public class PShape implements PConstants {
|
||||
|
||||
/**
|
||||
*
|
||||
* The width of the PShape document.
|
||||
* The width of the <b>PShape</b> document.
|
||||
*
|
||||
* @webref pshape:field
|
||||
* @usage web_application
|
||||
@@ -155,7 +155,7 @@ public class PShape implements PConstants {
|
||||
public float width;
|
||||
/**
|
||||
*
|
||||
* The height of the PShape document.
|
||||
* The height of the <b>PShape</b> document.
|
||||
*
|
||||
* @webref pshape:field
|
||||
* @usage web_application
|
||||
@@ -2005,7 +2005,7 @@ public class PShape implements PConstants {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of children within the PShape.
|
||||
* Returns the number of children within the <b>PShape</b>.
|
||||
*
|
||||
* @webref
|
||||
* @webBrief Returns the number of children
|
||||
@@ -2037,7 +2037,7 @@ public class PShape implements PConstants {
|
||||
*
|
||||
* @webref pshape:method
|
||||
* @usage web_application
|
||||
* @webBrief Returns a child element of a shape as a PShape object
|
||||
* @webBrief Returns a child element of a shape as a <b>PShape</b> object
|
||||
* @param index the layer position of the shape to get
|
||||
* @see PShape#addChild(PShape)
|
||||
*/
|
||||
@@ -2256,7 +2256,7 @@ public class PShape implements PConstants {
|
||||
|
||||
/**
|
||||
* The <b>getVertexCount()</b> method returns the number of vertices that
|
||||
* make up a PShape. In the above example, the value 4 is returned by the
|
||||
* make up a <b>PShape</b>. In the above example, the value 4 is returned by the
|
||||
* <b>getVertexCount()</b> method because 4 vertices are defined in
|
||||
* <b>setup()</b>.
|
||||
*
|
||||
@@ -2274,7 +2274,7 @@ public class PShape implements PConstants {
|
||||
|
||||
|
||||
/**
|
||||
* The <b>getVertex()</b> method returns a PVector with the coordinates of
|
||||
* The <b>getVertex()</b> method returns a <b>PVector</b> with the coordinates of
|
||||
* the vertex point located at the position defined by the <b>index</b>
|
||||
* parameter. This method works when shapes are created as shown in the
|
||||
* example above, but won't work properly when a shape is defined explicitly
|
||||
@@ -3309,7 +3309,7 @@ public class PShape implements PConstants {
|
||||
/**
|
||||
*
|
||||
* Replaces the current matrix of a shape with the identity matrix. The
|
||||
* equivalent function in OpenGL is glLoadIdentity().
|
||||
* equivalent function in OpenGL is <b>glLoadIdentity()</b>.
|
||||
*
|
||||
* @webref pshape:method
|
||||
* @webBrief Replaces the current matrix of a shape with the identity matrix
|
||||
|
||||
@@ -138,7 +138,7 @@ public class PVector implements Serializable {
|
||||
/**
|
||||
*
|
||||
* Sets the x, y, and z component of the vector using two or three separate
|
||||
* variables, the data from a PVector, or the values from a float array.
|
||||
* variables, the data from a <b>PVector</b>, or the values from a float array.
|
||||
*
|
||||
*
|
||||
* @webref pvector:method
|
||||
@@ -345,7 +345,7 @@ public class PVector implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
* Copies the components of the vector and returns the result as a PVector.
|
||||
* Copies the components of the vector and returns the result as a <b>PVector</b>.
|
||||
*
|
||||
*
|
||||
* @webref pvector:method
|
||||
@@ -420,7 +420,7 @@ public class PVector implements Serializable {
|
||||
*
|
||||
* Adds x, y, and z components to a vector, adds one vector to another, or adds
|
||||
* two independent vectors together. The version of the method that adds two
|
||||
* vectors together is a static method and returns a new PVector, the others act
|
||||
* vectors together is a static method and returns a new <b>PVector</b>, the others act
|
||||
* directly on the vector itself. See the examples for more context.
|
||||
*
|
||||
*
|
||||
@@ -488,7 +488,7 @@ public class PVector implements Serializable {
|
||||
*
|
||||
* Subtracts x, y, and z components from a vector, subtracts one vector from
|
||||
* another, or subtracts two independent vectors. The version of the method that
|
||||
* substracts two vectors is a static method and returns a PVector, the others
|
||||
* substracts two vectors is a static method and returns a <b>PVector</b>, the others
|
||||
* act directly on the vector. See the examples for more context. In all cases,
|
||||
* the second vector (v2) is subtracted from the first (v1), resulting in v1-v2.
|
||||
*
|
||||
@@ -557,8 +557,8 @@ public class PVector implements Serializable {
|
||||
*
|
||||
* Multiplies a vector by a scalar. The version of the method that uses a float
|
||||
* acts directly on the vector upon which it is called (as in the first example
|
||||
* above). The versions that receive both a PVector and a float as arguments are
|
||||
* static methods, and each returns a new PVector that is the result of the
|
||||
* above). The versions that receive both a <b>PVector</b> and a float as arguments are
|
||||
* static methods, and each returns a new <b>PVector</b> that is the result of the
|
||||
* multiplication operation. Both examples above produce the same visual output.
|
||||
*
|
||||
*
|
||||
@@ -601,8 +601,8 @@ public class PVector implements Serializable {
|
||||
*
|
||||
* Divides a vector by a scalar. The version of the method that uses a float
|
||||
* acts directly on the vector upon which it is called (as in the first example
|
||||
* above). The version that receives both a PVector and a float as arguments is
|
||||
* a static methods, and returns a new PVector that is the result of the
|
||||
* above). The version that receives both a <b>PVector</b> and a <b>float</b> as arguments is
|
||||
* a static methods, and returns a new <b>PVector</b> that is the result of the
|
||||
* division operation. Both examples above produce the same visual output.
|
||||
*
|
||||
* @webref pvector:method
|
||||
@@ -898,7 +898,7 @@ public class PVector implements Serializable {
|
||||
* static version is used by referencing the PVector class directly. (See the
|
||||
* middle example above.) The non-static versions, <b>lerp(v, amt)</b> and
|
||||
* <b>lerp(x, y, z, amt)</b>, do not create a new PVector, but transform the
|
||||
* values of the PVector on which they are called. These non-static versions
|
||||
* values of the <b>PVector</b> on which they are called. These non-static versions
|
||||
* perform the same operation, but the former takes another vector as input,
|
||||
* while the latter takes three float values. (See the top and bottom examples
|
||||
* above, respectively.)
|
||||
|
||||
Reference in New Issue
Block a user