propane 3.5.0-java → 3.6.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.mvn/extensions.xml +1 -1
  3. data/.mvn/wrapper/MavenWrapperDownloader.java +1 -1
  4. data/.mvn/wrapper/maven-wrapper.properties +2 -2
  5. data/.travis.yml +1 -1
  6. data/CHANGELOG.md +3 -1
  7. data/README.md +5 -13
  8. data/Rakefile +1 -1
  9. data/lib/propane.rb +2 -1
  10. data/lib/propane/helper_methods.rb +0 -1
  11. data/lib/propane/runner.rb +2 -0
  12. data/lib/propane/version.rb +1 -1
  13. data/pom.rb +43 -43
  14. data/pom.xml +4 -4
  15. data/propane.gemspec +4 -3
  16. data/src/main/java/japplemenubar/JAppleMenuBar.java +3 -3
  17. data/src/main/java/processing/awt/PGraphicsJava2D.java +8 -17
  18. data/src/main/java/processing/awt/PImageAWT.java +123 -6
  19. data/src/main/java/processing/awt/PShapeJava2D.java +1 -0
  20. data/src/main/java/processing/awt/PSurfaceAWT.java +9 -7
  21. data/src/main/java/processing/awt/ShimAWT.java +2 -1
  22. data/src/main/java/processing/core/PApplet.java +4605 -6014
  23. data/src/main/java/processing/core/PConstants.java +5 -5
  24. data/src/main/java/processing/core/PFont.java +5 -17
  25. data/src/main/java/processing/core/PGraphics.java +308 -320
  26. data/src/main/java/processing/core/PImage.java +1440 -1537
  27. data/src/main/java/processing/core/PMatrix2D.java +24 -7
  28. data/src/main/java/processing/core/PMatrix3D.java +12 -5
  29. data/src/main/java/processing/core/PShape.java +155 -173
  30. data/src/main/java/processing/core/PShapeOBJ.java +2 -0
  31. data/src/main/java/processing/core/PShapeSVG.java +632 -611
  32. data/src/main/java/processing/core/PSurface.java +15 -10
  33. data/src/main/java/processing/core/PSurfaceNone.java +8 -4
  34. data/src/main/java/processing/core/PVector.java +35 -28
  35. data/src/main/java/processing/data/Table.java +20 -20
  36. data/src/main/java/processing/data/XML.java +1 -1
  37. data/src/main/java/processing/event/Event.java +1 -1
  38. data/src/main/java/processing/event/MouseEvent.java +7 -6
  39. data/src/main/java/processing/javafx/PGraphicsFX2D.java +20 -345
  40. data/src/main/java/processing/javafx/PSurfaceFX.java +127 -125
  41. data/src/main/java/processing/opengl/FrameBuffer.java +2 -4
  42. data/src/main/java/processing/opengl/LinePath.java +4 -0
  43. data/src/main/java/processing/opengl/LineStroker.java +2 -6
  44. data/src/main/java/processing/opengl/PGL.java +72 -45
  45. data/src/main/java/processing/opengl/PGraphicsOpenGL.java +106 -60
  46. data/src/main/java/processing/opengl/PJOGL.java +15 -3
  47. data/src/main/java/processing/opengl/PShader.java +26 -47
  48. data/src/main/java/processing/opengl/PShapeOpenGL.java +1041 -1001
  49. data/src/main/java/processing/opengl/PSurfaceJOGL.java +211 -208
  50. data/src/main/java/processing/opengl/Texture.java +7 -4
  51. data/src/main/java/processing/opengl/VertexBuffer.java +2 -2
  52. data/vendors/Rakefile +22 -33
  53. metadata +38 -18
@@ -135,7 +135,7 @@ public interface PConstants {
135
135
  * useful in combination with the trigonometric functions <b>sin()</b> and
136
136
  * <b>cos()</b>.
137
137
  *
138
- *
138
+ * ( end auto-generated )
139
139
  * @webref constants
140
140
  * @see PConstants#TWO_PI
141
141
  * @see PConstants#TAU
@@ -152,7 +152,7 @@ public interface PConstants {
152
152
  * circle to its diameter. It is useful in combination with the
153
153
  * trigonometric functions <b>sin()</b> and <b>cos()</b>.
154
154
  *
155
- *
155
+ * ( end auto-generated )
156
156
  * @webref constants
157
157
  * @see PConstants#PI
158
158
  * @see PConstants#TWO_PI
@@ -169,7 +169,7 @@ public interface PConstants {
169
169
  * It is useful in combination with the trigonometric functions
170
170
  * <b>sin()</b> and <b>cos()</b>.
171
171
  *
172
- *
172
+ * ( end auto-generated )
173
173
  * @webref constants
174
174
  * @see PConstants#PI
175
175
  * @see PConstants#TWO_PI
@@ -185,7 +185,7 @@ public interface PConstants {
185
185
  * It is useful in combination with the trigonometric functions
186
186
  * <b>sin()</b> and <b>cos()</b>.
187
187
  *
188
- *
188
+ * ( end auto-generated )
189
189
  * @webref constants
190
190
  * @see PConstants#PI
191
191
  * @see PConstants#TAU
@@ -201,7 +201,7 @@ public interface PConstants {
201
201
  * of a circle to its diameter. It is useful in combination with the
202
202
  * trigonometric functions <b>sin()</b> and <b>cos()</b>.
203
203
  *
204
- *
204
+ * ( end auto-generated )
205
205
  * @webref constants
206
206
  * @see PConstants#PI
207
207
  * @see PConstants#TWO_PI
@@ -24,24 +24,12 @@
24
24
 
25
25
  package processing.core;
26
26
 
27
- import java.awt.Color;
28
- import java.awt.Font;
29
- import java.awt.FontMetrics;
30
- import java.awt.Graphics2D;
31
- import java.awt.GraphicsEnvironment;
32
- import java.awt.RenderingHints;
33
- import java.awt.Shape;
34
- import java.awt.Toolkit;
27
+ import java.awt.*;
35
28
  import java.awt.font.FontRenderContext;
36
29
  import java.awt.font.GlyphVector;
37
30
  import java.awt.geom.PathIterator;
38
- import java.awt.image.BufferedImage;
39
- import java.awt.image.WritableRaster;
40
- import java.io.DataInputStream;
41
- import java.io.DataOutputStream;
42
- import java.io.IOException;
43
- import java.io.InputStream;
44
- import java.io.OutputStream;
31
+ import java.awt.image.*;
32
+ import java.io.*;
45
33
  import java.util.Arrays;
46
34
  import java.util.HashMap;
47
35
 
@@ -198,7 +186,7 @@ public class PFont implements PConstants {
198
186
  * <b>createFont()</b> function for dynamically converting fonts into a
199
187
  * format to use with Processing.
200
188
  *
201
- *
189
+ * ( end auto-generated )
202
190
  *
203
191
  * @nowebref
204
192
  * @param font font the font object to create from
@@ -890,7 +878,7 @@ public class PFont implements PConstants {
890
878
  * fonts. This function is meant as a tool for programming local
891
879
  * applications and is not recommended for use in applets.
892
880
  *
893
- *
881
+ * ( end auto-generated )
894
882
  *
895
883
  * @webref pfont
896
884
  * @usage application
@@ -30,11 +30,9 @@ import java.awt.Color;
30
30
 
31
31
  // Used for the 'image' object that's been here forever
32
32
  import java.awt.Font;
33
- import java.awt.FontFormatException;
34
33
  import java.awt.Image;
35
34
 
36
35
  import java.io.File;
37
- import java.io.IOException;
38
36
  import java.io.InputStream;
39
37
  import java.util.Map;
40
38
  import java.util.HashMap;
@@ -63,7 +61,7 @@ import processing.opengl.PShader;
63
61
  * methods for this class are extensive. For a complete list, visit the <a
64
62
  * href="http://processing.googlecode.com/svn/trunk/processing/build/javadoc/core/">developer's reference.</a>
65
63
  *
66
- *
64
+ * ( end auto-generated )
67
65
  *
68
66
  * <h3>Advanced</h3>
69
67
  * Main graphics and rendering context, as well as the base API implementation.
@@ -109,7 +107,7 @@ import processing.opengl.PShader;
109
107
  * instance, imageImpl() handles drawing an image whose x/y/w/h and u/v coords
110
108
  * have been specified, and screen placement (independent of imageMode) has
111
109
  * been determined. There's no point in all renderers implementing the
112
- * <code>if (imageMode == BLAH)</code> placement/sizing logic, so that's handled
110
+ * <tt>if (imageMode == BLAH)</tt> placement/sizing logic, so that's handled
113
111
  * by PGraphics, which then calls imageImpl() once all that is figured out.
114
112
  *
115
113
  * <h2>His brother PImage</h2>
@@ -136,7 +134,7 @@ import processing.opengl.PShader;
136
134
  *
137
135
  * <h2>What's in the PGraphics documentation, what ain't</h2>
138
136
  * Some things are noted here, some things are not. For public API, always
139
- * refer to the <a href="http://processing.org/reference">reference</a>
137
+ * refer to the <a href="http://processing.org/reference">reference</A>
140
138
  * on Processing.org for proper explanations. <b>No attempt has been made to
141
139
  * keep the javadoc up to date or complete.</b> It's an enormous task for
142
140
  * which we simply do not have the time. That is, it's not something that
@@ -741,9 +739,10 @@ public class PGraphics extends PImage implements PConstants {
741
739
 
742
740
 
743
741
  /**
744
- * Set (or unset) this as the main drawing surface. Meaning that it can
745
- * safely be set to opaque (and given a default gray background), or anything
746
- * else that goes along with that.
742
+ * Set (or unset) this as the main drawing surface.Meaning that it can
743
+ safely be set to opaque (and given a default gray background), or anything
744
+ else that goes along with that.
745
+ * @param primary
747
746
  */
748
747
  public void setPrimary(boolean primary) { // ignore
749
748
  this.primaryGraphics = primary;
@@ -768,15 +767,14 @@ public class PGraphics extends PImage implements PConstants {
768
767
 
769
768
 
770
769
  /**
771
- * The final step in setting up a renderer, set its size of this renderer.
772
- * This was formerly handled by the constructor, but instead it's been broken
773
- * out so that setParent/setPrimary/setPath can be handled differently.
774
- *
775
- * Important: this is ignored by the Methods task because otherwise it will
776
- * override setSize() in PApplet/Applet/Component, which will 1) not call
777
- * super.setSize(), and 2) will cause the renderer to be resized from the
778
- * event thread (EDT), causing a nasty crash as it collides with the
779
- * animation thread.
770
+ * The final step in setting up a renderer, set its size of this renderer.This was formerly handled by the constructor, but instead it's been broken
771
+ out so that setParent/setPrimary/setPath can be handled differently.Important: this is ignored by the Methods task because otherwise it will
772
+ override setSize() in PApplet/Applet/Component, which will 1) not call
773
+ super.setSize(), and 2) will cause the renderer to be resized from the
774
+ event thread (EDT), causing a nasty crash as it collides with the
775
+ animation thread.
776
+ * @param w
777
+ * @param h
780
778
  */
781
779
  public void setSize(int w, int h) { // ignore
782
780
  width = w;
@@ -845,10 +843,11 @@ public class PGraphics extends PImage implements PConstants {
845
843
 
846
844
 
847
845
  /**
848
- * Get cache storage data for the specified renderer. Because each renderer
849
- * will cache data in different formats, it's necessary to store cache data
850
- * keyed by the renderer object. Otherwise, attempting to draw the same
851
- * image to both a PGraphicsJava2D and a PGraphicsOpenGL will cause errors.
846
+ * Get cache storage data for the specified renderer.Because each renderer
847
+ will cache data in different formats, it's necessary to store cache data
848
+ keyed by the renderer object. Otherwise, attempting to draw the same
849
+ image to both a PGraphicsJava2D and a PGraphicsOpenGL will cause errors.
850
+ * @param image
852
851
  * @return metadata stored for the specified renderer
853
852
  */
854
853
  public Object getCache(PImage image) { // ignore
@@ -895,7 +894,7 @@ public class PGraphics extends PImage implements PConstants {
895
894
  * Sets the default properties for a PGraphics object. It should be called
896
895
  * before anything is drawn into the object.
897
896
  *
898
- *
897
+ * ( end auto-generated )
899
898
  * <h3>Advanced</h3>
900
899
  * When creating your own PGraphics, you should call this before
901
900
  * drawing anything.
@@ -912,7 +911,7 @@ public class PGraphics extends PImage implements PConstants {
912
911
  *
913
912
  * Finalizes the rendering of a PGraphics object so that it can be shown on screen.
914
913
  *
915
- *
914
+ * ( end auto-generated )
916
915
  * <h3>Advanced</h3>
917
916
  *
918
917
  * When creating your own PGraphics, you should call this when
@@ -1156,7 +1155,7 @@ public class PGraphics extends PImage implements PConstants {
1156
1155
  * prevents the double negatives, and also reinforces which hints can be
1157
1156
  * enabled or disabled.
1158
1157
  *
1159
- *
1158
+ * ( end auto-generated )
1160
1159
  *
1161
1160
  * @webref rendering
1162
1161
  * @param which name of the hint to be enabled or disabled
@@ -1224,7 +1223,7 @@ public class PGraphics extends PImage implements PConstants {
1224
1223
  * <b>strokeJoin()</b> cannot be changed while inside a
1225
1224
  * <b>beginShape()</b>/<b>endShape()</b> block with any renderer.
1226
1225
  *
1227
- *
1226
+ * ( end auto-generated )
1228
1227
  * @webref shape:vertex
1229
1228
  * @param kind Either POINTS, LINES, TRIANGLES, TRIANGLE_FAN, TRIANGLE_STRIP, QUADS, or QUAD_STRIP
1230
1229
  * @see PShape
@@ -1239,8 +1238,8 @@ public class PGraphics extends PImage implements PConstants {
1239
1238
 
1240
1239
 
1241
1240
  /**
1242
- * Sets whether the upcoming vertex is part of an edge.
1243
- * Equivalent to glEdgeFlag(), for people familiar with OpenGL.
1241
+ * Sets whether the upcoming vertex is part of an edge.Equivalent to glEdgeFlag(), for people familiar with OpenGL.
1242
+ * @param edge
1244
1243
  */
1245
1244
  public void edge(boolean edge) {
1246
1245
  this.edge = edge;
@@ -1257,7 +1256,7 @@ public class PGraphics extends PImage implements PConstants {
1257
1256
  * imperfect, this is a better option when you want more control. This
1258
1257
  * function is identical to glNormal3f() in OpenGL.
1259
1258
  *
1260
- *
1259
+ * ( end auto-generated )
1261
1260
  * @webref lights_camera:lights
1262
1261
  * @param nx x direction
1263
1262
  * @param ny y direction
@@ -1326,7 +1325,7 @@ public class PGraphics extends PImage implements PConstants {
1326
1325
  * the points (0,0) (0,100) (100,200) (0,200). The same mapping in
1327
1326
  * NORMAL_SPACE is (0,0) (0,1) (1,1) (0,1).
1328
1327
  *
1329
- *
1328
+ * ( end auto-generated )
1330
1329
  * @webref image:textures
1331
1330
  * @param mode either IMAGE or NORMAL
1332
1331
  * @see PGraphics#texture(PImage)
@@ -1366,7 +1365,7 @@ public class PGraphics extends PImage implements PConstants {
1366
1365
  * When textures are in use, the fill color is ignored. Instead, use tint()
1367
1366
  * to specify the color of the texture as it is applied to the shape.
1368
1367
  *
1369
- *
1368
+ * ( end auto-generated )
1370
1369
  * @webref image:textures
1371
1370
  * @param image reference to a PImage object
1372
1371
  * @see PGraphics#textureMode(int)
@@ -1621,7 +1620,7 @@ public class PGraphics extends PImage implements PConstants {
1621
1620
  * <b>v</b> are specified in relation to the image's size in pixels, but
1622
1621
  * this relation can be changed with <b>textureMode()</b>.
1623
1622
  *
1624
- *
1623
+ * ( end auto-generated )
1625
1624
  * @webref shape:vertex
1626
1625
  * @param x x-coordinate of the vertex
1627
1626
  * @param y y-coordinate of the vertex
@@ -1651,18 +1650,18 @@ public class PGraphics extends PImage implements PConstants {
1651
1650
 
1652
1651
 
1653
1652
  /**
1654
- * Set (U, V) coords for the next vertex in the current shape.
1655
- * This is ugly as its own function, and will (almost?) always be
1656
- * coincident with a call to vertex. As of beta, this was moved to
1657
- * the protected method you see here, and called from an optional
1658
- * param of and overloaded vertex().
1659
- *
1653
+ * Set (U, V) coords for the next vertex in the current shape.This is ugly as its own function, and will (almost?) always be
1654
+ coincident with a call to vertex.As of beta, this was moved to
1655
+ the protected method you see here, and called from an optional
1656
+ param of and overloaded vertex().
1660
1657
  * The parameters depend on the current textureMode. When using
1661
- * textureMode(IMAGE), the coordinates will be relative to the size
1662
- * of the image texture, when used with textureMode(NORMAL),
1663
- * they'll be in the range 0..1.
1664
- *
1665
- * Used by both PGraphics2D (for images) and PGraphics3D.
1658
+ textureMode(IMAGE), the coordinates will be relative to the size
1659
+ of the image texture, when used with textureMode(NORMAL),
1660
+ they'll be in the range 0..1.
1661
+
1662
+ Used by both PGraphics2D (for images) and PGraphics3D.
1663
+ * @param u
1664
+ * @param v
1666
1665
  */
1667
1666
  protected void vertexTexture(float u, float v) {
1668
1667
  if (textureImage == null) {
@@ -1722,7 +1721,7 @@ public class PGraphics extends PImage implements PConstants {
1722
1721
  * as the value for the MODE parameter to close the shape (to connect the
1723
1722
  * beginning and the end).
1724
1723
  *
1725
- *
1724
+ * ( end auto-generated )
1726
1725
  * @webref shape:vertex
1727
1726
  * @param mode use CLOSE to close the shape
1728
1727
  * @see PShape
@@ -1739,6 +1738,7 @@ public class PGraphics extends PImage implements PConstants {
1739
1738
 
1740
1739
 
1741
1740
  /**
1741
+ * @return
1742
1742
  * @webref shape
1743
1743
  * @param filename name of file to load, can be .svg or .obj
1744
1744
  * @see PShape
@@ -1890,7 +1890,7 @@ public class PGraphics extends PImage implements PConstants {
1890
1890
  *
1891
1891
  * This is a new reference entry for Processing 2.0. It will be updated shortly.
1892
1892
  *
1893
- *
1893
+ * ( end auto-generated )
1894
1894
  *
1895
1895
  * @webref rendering:shaders
1896
1896
  * @param fragFilename name of fragment shader file
@@ -1915,7 +1915,7 @@ public class PGraphics extends PImage implements PConstants {
1915
1915
  *
1916
1916
  * This is a new reference entry for Processing 2.0. It will be updated shortly.
1917
1917
  *
1918
- *
1918
+ * ( end auto-generated )
1919
1919
  *
1920
1920
  * @webref rendering:shaders
1921
1921
  * @param shader name of shader file
@@ -1938,7 +1938,7 @@ public class PGraphics extends PImage implements PConstants {
1938
1938
  *
1939
1939
  * This is a new reference entry for Processing 2.0. It will be updated shortly.
1940
1940
  *
1941
- *
1941
+ * ( end auto-generated )
1942
1942
  *
1943
1943
  * @webref rendering:shaders
1944
1944
  */
@@ -1975,7 +1975,7 @@ public class PGraphics extends PImage implements PConstants {
1975
1975
  * by the parameters. The boundaries are drawn based on the state
1976
1976
  * of the <b>imageMode()</b> fuction, either CORNER, CORNERS, or CENTER.
1977
1977
  *
1978
- *
1978
+ * ( end auto-generated )
1979
1979
  *
1980
1980
  * @webref rendering
1981
1981
  * @param a x-coordinate of the rectangle, by default
@@ -2026,7 +2026,7 @@ public class PGraphics extends PImage implements PConstants {
2026
2026
  *
2027
2027
  * Disables the clipping previously started by the <b>clip()</b> function.
2028
2028
  *
2029
- *
2029
+ * ( end auto-generated )
2030
2030
  *
2031
2031
  * @webref rendering
2032
2032
  */
@@ -2045,7 +2045,7 @@ public class PGraphics extends PImage implements PConstants {
2045
2045
  *
2046
2046
  * This is a new reference entry for Processing 2.0. It will be updated shortly.
2047
2047
  *
2048
- *
2048
+ * ( end auto-generated )
2049
2049
  *
2050
2050
  * @webref rendering
2051
2051
  * @param mode the blending mode to use
@@ -2127,7 +2127,7 @@ public class PGraphics extends PImage implements PConstants {
2127
2127
  * 3D version requires rendering with P3D (see the Environment reference
2128
2128
  * for more information).
2129
2129
  *
2130
- *
2130
+ * ( end auto-generated )
2131
2131
  * @webref shape:vertex
2132
2132
  * @param x2 the x-coordinate of the 1st control point
2133
2133
  * @param y2 the y-coordinate of the 1st control point
@@ -2260,7 +2260,7 @@ public class PGraphics extends PImage implements PConstants {
2260
2260
  * version requires rendering with P3D (see the Environment reference for
2261
2261
  * more information).
2262
2262
  *
2263
- *
2263
+ * ( end auto-generated )
2264
2264
  *
2265
2265
  * @webref shape:vertex
2266
2266
  * @param x the x-coordinate of the vertex
@@ -2411,7 +2411,7 @@ public class PGraphics extends PImage implements PConstants {
2411
2411
  * requires the P3D parameter in combination with <b>size()</b> as shown in
2412
2412
  * the above example.
2413
2413
  *
2414
- *
2414
+ * ( end auto-generated )
2415
2415
  *
2416
2416
  * @webref shape:2d_primitives
2417
2417
  * @param x x-coordinate of the point
@@ -2446,7 +2446,7 @@ public class PGraphics extends PImage implements PConstants {
2446
2446
  * Drawing this shape in 3D with the <b>z</b> parameter requires the P3D
2447
2447
  * parameter in combination with <b>size()</b> as shown in the above example.
2448
2448
  *
2449
- *
2449
+ * ( end auto-generated )
2450
2450
  * @webref shape:2d_primitives
2451
2451
  * @param x1 x-coordinate of the first point
2452
2452
  * @param y1 y-coordinate of the first point
@@ -2483,7 +2483,7 @@ public class PGraphics extends PImage implements PConstants {
2483
2483
  * arguments specify the first point, the middle two arguments specify the
2484
2484
  * second point, and the last two arguments specify the third point.
2485
2485
  *
2486
- *
2486
+ * ( end auto-generated )
2487
2487
  * @webref shape:2d_primitives
2488
2488
  * @param x1 x-coordinate of the first point
2489
2489
  * @param y1 y-coordinate of the first point
@@ -2512,7 +2512,7 @@ public class PGraphics extends PImage implements PConstants {
2512
2512
  * vertex and the subsequent pairs should proceed clockwise or
2513
2513
  * counter-clockwise around the defined shape.
2514
2514
  *
2515
- *
2515
+ * ( end auto-generated )
2516
2516
  * @webref shape:2d_primitives
2517
2517
  * @param x1 x-coordinate of the first corner
2518
2518
  * @param y1 y-coordinate of the first corner
@@ -2558,7 +2558,7 @@ public class PGraphics extends PImage implements PConstants {
2558
2558
  * sensitive language. Note: In version 125, the mode named CENTER_RADIUS
2559
2559
  * was shortened to RADIUS.
2560
2560
  *
2561
- *
2561
+ * ( end auto-generated )
2562
2562
  * @webref shape:attributes
2563
2563
  * @param mode either CORNER, CORNERS, CENTER, or RADIUS
2564
2564
  * @see PGraphics#rect(float, float, float, float)
@@ -2577,7 +2577,7 @@ public class PGraphics extends PImage implements PConstants {
2577
2577
  * fourth sets the height. These parameters may be changed with the
2578
2578
  * <b>rectMode()</b> function.
2579
2579
  *
2580
- *
2580
+ * ( end auto-generated )
2581
2581
  *
2582
2582
  * @webref shape:2d_primitives
2583
2583
  * @param a x-coordinate of the rectangle by default
@@ -2743,7 +2743,7 @@ public class PGraphics extends PImage implements PConstants {
2743
2743
  * these parameters are interpreted, however, may be changed with the
2744
2744
  * <b>rectMode()</b> function.
2745
2745
  *
2746
- *
2746
+ * ( end auto-generated )
2747
2747
  *
2748
2748
  * @webref shape:2d_primitives
2749
2749
  * @param x x-coordinate of the rectangle by default
@@ -2777,7 +2777,7 @@ public class PGraphics extends PImage implements PConstants {
2777
2777
  * ellipse's bounding box. The parameter must be written in ALL CAPS
2778
2778
  * because Processing is a case-sensitive language.
2779
2779
  *
2780
- *
2780
+ * ( end auto-generated )
2781
2781
  * @webref shape:attributes
2782
2782
  * @param mode either CENTER, RADIUS, CORNER, or CORNERS
2783
2783
  * @see PApplet#ellipse(float, float, float, float)
@@ -2796,7 +2796,7 @@ public class PGraphics extends PImage implements PConstants {
2796
2796
  * the location, the third sets the width, and the fourth sets the height.
2797
2797
  * The origin may be changed with the <b>ellipseMode()</b> function.
2798
2798
  *
2799
- *
2799
+ * ( end auto-generated )
2800
2800
  * @webref shape:2d_primitives
2801
2801
  * @param a x-coordinate of the ellipse
2802
2802
  * @param b y-coordinate of the ellipse
@@ -2811,23 +2811,19 @@ public class PGraphics extends PImage implements PConstants {
2811
2811
  float w = c;
2812
2812
  float h = d;
2813
2813
 
2814
- switch (ellipseMode) {
2815
- case CORNERS:
2816
- w = c - a;
2817
- h = d - b;
2818
- break;
2819
- case RADIUS:
2820
- x = a - c;
2821
- y = b - d;
2822
- w = c * 2;
2823
- h = d * 2;
2824
- break;
2825
- case DIAMETER:
2826
- x = a - c/2f;
2827
- y = b - d/2f;
2828
- break;
2829
- default:
2830
- break;
2814
+ if (ellipseMode == CORNERS) {
2815
+ w = c - a;
2816
+ h = d - b;
2817
+
2818
+ } else if (ellipseMode == RADIUS) {
2819
+ x = a - c;
2820
+ y = b - d;
2821
+ w = c * 2;
2822
+ h = d * 2;
2823
+
2824
+ } else if (ellipseMode == DIAMETER) {
2825
+ x = a - c/2f;
2826
+ y = b - d/2f;
2831
2827
  }
2832
2828
 
2833
2829
  if (w < 0) { // undo negative width
@@ -2857,7 +2853,7 @@ public class PGraphics extends PImage implements PConstants {
2857
2853
  * with the <b>ellipseMode()</b> function. The <b>start</b> and <b>stop</b>
2858
2854
  * parameters specify the angles at which to draw the arc.
2859
2855
  *
2860
- *
2856
+ * ( end auto-generated )
2861
2857
  * @webref shape:2d_primitives
2862
2858
  * @param a x-coordinate of the arc's ellipse
2863
2859
  * @param b y-coordinate of the arc's ellipse
@@ -2885,23 +2881,19 @@ public class PGraphics extends PImage implements PConstants {
2885
2881
  float w = c;
2886
2882
  float h = d;
2887
2883
 
2888
- switch (ellipseMode) {
2889
- case CORNERS:
2890
- w = c - a;
2891
- h = d - b;
2892
- break;
2893
- case RADIUS:
2894
- x = a - c;
2895
- y = b - d;
2896
- w = c * 2;
2897
- h = d * 2;
2898
- break;
2899
- case CENTER:
2900
- x = a - c/2f;
2901
- y = b - d/2f;
2902
- break;
2903
- default:
2904
- break;
2884
+ if (ellipseMode == CORNERS) {
2885
+ w = c - a;
2886
+ h = d - b;
2887
+
2888
+ } else if (ellipseMode == RADIUS) {
2889
+ x = a - c;
2890
+ y = b - d;
2891
+ w = c * 2;
2892
+ h = d * 2;
2893
+
2894
+ } else if (ellipseMode == CENTER) {
2895
+ x = a - c/2f;
2896
+ y = b - d/2f;
2905
2897
  }
2906
2898
 
2907
2899
  // make sure the loop will exit before starting while
@@ -2948,7 +2940,7 @@ public class PGraphics extends PImage implements PConstants {
2948
2940
  * and height. The origin may be changed with the <b>ellipseMode()</b>
2949
2941
  * function.
2950
2942
  *
2951
- *
2943
+ * ( end auto-generated )
2952
2944
  * @webref shape:2d_primitives
2953
2945
  * @param x x-coordinate of the ellipse
2954
2946
  * @param y y-coordinate of the ellipse
@@ -2971,7 +2963,7 @@ public class PGraphics extends PImage implements PConstants {
2971
2963
  * A box is an extruded rectangle. A box with equal dimension on all sides
2972
2964
  * is a cube.
2973
2965
  *
2974
- *
2966
+ * ( end auto-generated )
2975
2967
  *
2976
2968
  * @webref shape:3d_primitives
2977
2969
  * @param size dimension of the box in all dimensions (creates a cube)
@@ -3064,7 +3056,7 @@ public class PGraphics extends PImage implements PConstants {
3064
3056
  * and vertical resolution independently, use the version of the functions
3065
3057
  * with two parameters.
3066
3058
  *
3067
- *
3059
+ * ( end auto-generated )
3068
3060
  *
3069
3061
  * <h3>Advanced</h3>
3070
3062
  * Code for sphereDetail() submitted by toxi [031031].
@@ -3130,7 +3122,7 @@ public class PGraphics extends PImage implements PConstants {
3130
3122
  *
3131
3123
  * A sphere is a hollow ball made from tessellated triangles.
3132
3124
  *
3133
- *
3125
+ * ( end auto-generated )
3134
3126
  *
3135
3127
  * <h3>Advanced</h3>
3136
3128
  * <P>
@@ -3237,7 +3229,7 @@ public class PGraphics extends PImage implements PConstants {
3237
3229
  * second time with the y coordinates to get the location of a bezier curve
3238
3230
  * at t.
3239
3231
  *
3240
- *
3232
+ * ( end auto-generated )
3241
3233
  *
3242
3234
  * <h3>Advanced</h3>
3243
3235
  * For instance, to convert the following example:<PRE>
@@ -3281,7 +3273,7 @@ public class PGraphics extends PImage implements PConstants {
3281
3273
  * definition of <a href="http://en.wikipedia.org/wiki/Tangent"
3282
3274
  * target="new"><em>tangent</em> on Wikipedia</a>.
3283
3275
  *
3284
- *
3276
+ * ( end auto-generated )
3285
3277
  *
3286
3278
  * <h3>Advanced</h3>
3287
3279
  * Code submitted by Dave Bollinger (davol) for release 0136.
@@ -3324,7 +3316,7 @@ public class PGraphics extends PImage implements PConstants {
3324
3316
  * This function is only useful when using the P3D renderer as the default
3325
3317
  * P2D renderer does not use this information.
3326
3318
  *
3327
- *
3319
+ * ( end auto-generated )
3328
3320
  *
3329
3321
  * @webref shape:curves
3330
3322
  * @param detail resolution of the curves
@@ -3372,7 +3364,7 @@ public class PGraphics extends PImage implements PConstants {
3372
3364
  * Bezier. Using the 3D version requires rendering with P3D (see the
3373
3365
  * Environment reference for more information).
3374
3366
  *
3375
- *
3367
+ * ( end auto-generated )
3376
3368
  *
3377
3369
  * <h3>Advanced</h3>
3378
3370
  * Draw a cubic bezier curve. The first and last points are
@@ -3440,7 +3432,7 @@ public class PGraphics extends PImage implements PConstants {
3440
3432
  * the points on the curve. This can be done once with the x coordinates and a
3441
3433
  * second time with the y coordinates to get the location of a curve at t.
3442
3434
  *
3443
- *
3435
+ * ( end auto-generated )
3444
3436
  *
3445
3437
  * @webref shape:curves
3446
3438
  * @param a coordinate of first control point
@@ -3474,7 +3466,7 @@ public class PGraphics extends PImage implements PConstants {
3474
3466
  * of <em><a href="http://en.wikipedia.org/wiki/Tangent"
3475
3467
  * target="new">tangent on Wikipedia</a></em>.
3476
3468
  *
3477
- *
3469
+ * ( end auto-generated )
3478
3470
  *
3479
3471
  * <h3>Advanced</h3>
3480
3472
  * Code thanks to Dave Bollinger (Bug #715)
@@ -3512,7 +3504,7 @@ public class PGraphics extends PImage implements PConstants {
3512
3504
  * This function is only useful when using the P3D renderer as the default
3513
3505
  * P2D renderer does not use this information.
3514
3506
  *
3515
- *
3507
+ * ( end auto-generated )
3516
3508
  *
3517
3509
  * @webref shape:curves
3518
3510
  * @param detail resolution of the curves
@@ -3537,7 +3529,7 @@ public class PGraphics extends PImage implements PConstants {
3537
3529
  * within the range -5.0 and 5.0 will deform the curves but will leave them
3538
3530
  * recognizable and as values increase in magnitude, they will continue to deform.
3539
3531
  *
3540
- *
3532
+ * ( end auto-generated )
3541
3533
  *
3542
3534
  * @webref shape:curves
3543
3535
  * @param tightness amount of deformation from the original vertices
@@ -3616,7 +3608,7 @@ public class PGraphics extends PImage implements PConstants {
3616
3608
  * implementation of Catmull-Rom splines. Using the 3D version requires
3617
3609
  * rendering with P3D (see the Environment reference for more information).
3618
3610
  *
3619
- *
3611
+ * ( end auto-generated )
3620
3612
  *
3621
3613
  * <h3>Advanced</h3>
3622
3614
  * As of revision 0070, this function no longer doubles the first
@@ -3763,7 +3755,7 @@ public class PGraphics extends PImage implements PConstants {
3763
3755
  * The parameter to <b>imageMode()</b> must be written in ALL CAPS because
3764
3756
  * Processing is a case-sensitive language.
3765
3757
  *
3766
- *
3758
+ * ( end auto-generated )
3767
3759
  *
3768
3760
  * @webref image:loading_displaying
3769
3761
  * @param mode either CORNER, CORNERS, or CENTER
@@ -3803,7 +3795,7 @@ public class PGraphics extends PImage implements PConstants {
3803
3795
  * The color of an image may be modified with the <b>tint()</b> function.
3804
3796
  * This function will maintain transparency for GIF and PNG images.
3805
3797
  *
3806
- *
3798
+ * ( end auto-generated )
3807
3799
  *
3808
3800
  * <h3>Advanced</h3>
3809
3801
  * Starting with release 0124, when using the default (JAVA2D) renderer,
@@ -3862,37 +3854,40 @@ public class PGraphics extends PImage implements PConstants {
3862
3854
  // loadImageAsync() sets width and height to -1 when loading fails.
3863
3855
  if (img.width == -1 || img.height == -1) return;
3864
3856
 
3865
- switch (imageMode) {
3866
- case CORNER:
3867
- if (c < 0) { // reset a negative width
3868
- a += c; c = -c;
3869
- } if (d < 0) { // reset a negative height
3870
- b += d; d = -d;
3871
- } imageImpl(img,
3872
- a, b, a + c, b + d,
3873
- u1, v1, u2, v2);
3874
- break;
3875
- case CORNERS:
3876
- if (c < a) { // reverse because x2 < x1
3877
- float temp = a; a = c; c = temp;
3878
- } if (d < b) { // reverse because y2 < y1
3879
- float temp = b; b = d; d = temp;
3880
- } imageImpl(img,
3881
- a, b, c, d,
3882
- u1, v1, u2, v2);
3883
- break;
3884
- case CENTER:
3885
- // c and d are width/height
3886
- if (c < 0) c = -c;
3887
- if (d < 0) d = -d;
3888
- float x1 = a - c/2;
3889
- float y1 = b - d/2;
3890
- imageImpl(img,
3891
- x1, y1, x1 + c, y1 + d,
3892
- u1, v1, u2, v2);
3893
- break;
3894
- default:
3895
- break;
3857
+ if (imageMode == CORNER) {
3858
+ if (c < 0) { // reset a negative width
3859
+ a += c; c = -c;
3860
+ }
3861
+ if (d < 0) { // reset a negative height
3862
+ b += d; d = -d;
3863
+ }
3864
+
3865
+ imageImpl(img,
3866
+ a, b, a + c, b + d,
3867
+ u1, v1, u2, v2);
3868
+
3869
+ } else if (imageMode == CORNERS) {
3870
+ if (c < a) { // reverse because x2 < x1
3871
+ float temp = a; a = c; c = temp;
3872
+ }
3873
+ if (d < b) { // reverse because y2 < y1
3874
+ float temp = b; b = d; d = temp;
3875
+ }
3876
+
3877
+ imageImpl(img,
3878
+ a, b, c, d,
3879
+ u1, v1, u2, v2);
3880
+
3881
+ } else if (imageMode == CENTER) {
3882
+ // c and d are width/height
3883
+ if (c < 0) c = -c;
3884
+ if (d < 0) d = -d;
3885
+ float x1 = a - c/2;
3886
+ float y1 = b - d/2;
3887
+
3888
+ imageImpl(img,
3889
+ x1, y1, x1 + c, y1 + d,
3890
+ u1, v1, u2, v2);
3896
3891
  }
3897
3892
  }
3898
3893
 
@@ -3978,7 +3973,7 @@ public class PGraphics extends PImage implements PConstants {
3978
3973
  * and height. The parameter must be written in "ALL CAPS" because
3979
3974
  * Processing is a case sensitive language.
3980
3975
  *
3981
- *
3976
+ * ( end auto-generated )
3982
3977
  *
3983
3978
  * @webref shape:loading_displaying
3984
3979
  * @param mode either CORNER, CORNERS, CENTER
@@ -4029,7 +4024,7 @@ public class PGraphics extends PImage implements PConstants {
4029
4024
  * Note complex shapes may draw awkwardly with P3D. This renderer does not
4030
4025
  * yet support shapes that have holes or complicated breaks.
4031
4026
  *
4032
- *
4027
+ * ( end auto-generated )
4033
4028
  *
4034
4029
  * @webref shape:loading_displaying
4035
4030
  * @param shape the shape to display
@@ -4078,26 +4073,22 @@ public class PGraphics extends PImage implements PConstants {
4078
4073
 
4079
4074
  pushMatrix();
4080
4075
 
4081
- switch (shapeMode) {
4082
- case CENTER:
4083
- // x and y are center, c and d refer to a diameter
4084
- translate(a - c/2f, b - d/2f);
4085
- scale(c / shape.getWidth(), d / shape.getHeight());
4086
- break;
4087
- case CORNER:
4088
- translate(a, b);
4089
- scale(c / shape.getWidth(), d / shape.getHeight());
4090
- break;
4091
- case CORNERS:
4092
- // c and d are x2/y2, make them into width/height
4093
- c -= a;
4094
- d -= b;
4095
- // then same as above
4096
- translate(a, b);
4097
- scale(c / shape.getWidth(), d / shape.getHeight());
4098
- break;
4099
- default:
4100
- break;
4076
+ if (shapeMode == CENTER) {
4077
+ // x and y are center, c and d refer to a diameter
4078
+ translate(a - c/2f, b - d/2f);
4079
+ scale(c / shape.getWidth(), d / shape.getHeight());
4080
+
4081
+ } else if (shapeMode == CORNER) {
4082
+ translate(a, b);
4083
+ scale(c / shape.getWidth(), d / shape.getHeight());
4084
+
4085
+ } else if (shapeMode == CORNERS) {
4086
+ // c and d are x2/y2, make them into width/height
4087
+ c -= a;
4088
+ d -= b;
4089
+ // then same as above
4090
+ translate(a, b);
4091
+ scale(c / shape.getWidth(), d / shape.getHeight());
4101
4092
  }
4102
4093
  shape.draw(this);
4103
4094
 
@@ -4150,8 +4141,9 @@ public class PGraphics extends PImage implements PConstants {
4150
4141
  }
4151
4142
  return createFont(baseFont, size, smooth, charset, stream != null);
4152
4143
 
4153
- } catch (FontFormatException | IOException e) {
4144
+ } catch (Exception e) {
4154
4145
  System.err.println("Problem with createFont(\"" + name + "\")");
4146
+ e.printStackTrace();
4155
4147
  return null;
4156
4148
  }
4157
4149
  }
@@ -4198,7 +4190,7 @@ public class PGraphics extends PImage implements PConstants {
4198
4190
  * <b>textAscent()</b> or <b>textDescent()</b> so that the hack works even
4199
4191
  * if you change the size of the font.
4200
4192
  *
4201
- *
4193
+ * ( end auto-generated )
4202
4194
  *
4203
4195
  * @webref typography:attributes
4204
4196
  * @param alignX horizontal alignment, either LEFT, CENTER, or RIGHT
@@ -4224,7 +4216,7 @@ public class PGraphics extends PImage implements PConstants {
4224
4216
  * example, adding the <b>textAscent()</b> and <b>textDescent()</b> values
4225
4217
  * will give you the total height of the line.
4226
4218
  *
4227
- *
4219
+ * ( end auto-generated )
4228
4220
  *
4229
4221
  * @webref typography:metrics
4230
4222
  * @see PGraphics#textDescent()
@@ -4245,7 +4237,7 @@ public class PGraphics extends PImage implements PConstants {
4245
4237
  * baseline. For example, adding the <b>textAscent()</b> and
4246
4238
  * <b>textDescent()</b> values will give you the total height of the line.
4247
4239
  *
4248
- *
4240
+ * ( end auto-generated )
4249
4241
  *
4250
4242
  * @webref typography:metrics
4251
4243
  * @see PGraphics#textAscent()
@@ -4266,18 +4258,18 @@ public class PGraphics extends PImage implements PConstants {
4266
4258
  * used. This font will be used in all subsequent calls to the
4267
4259
  * <b>text()</b> function. If no <b>size</b> parameter is input, the font
4268
4260
  * will appear at its original size (the size it was created at with the
4269
- * "Create Font..." tool) until it is changed with <b>textSize()</b>.
4270
- * Because fonts are usually bitmaped, you should create fonts at
4261
+ * "Create Font..." tool) until it is changed with <b>textSize()</b>. <br
4262
+ * /> Because fonts are usually bitmaped, you should create fonts at
4271
4263
  * the sizes that will be used most commonly. Using <b>textFont()</b>
4272
- * without the size parameter will result in the cleanest-looking text.
4273
- * With the default (JAVA2D) and PDF renderers, it's also possible
4264
+ * without the size parameter will result in the cleanest-looking text. <br
4265
+ * /> With the default (JAVA2D) and PDF renderers, it's also possible
4274
4266
  * to enable the use of native fonts via the command
4275
4267
  * <b>hint(ENABLE_NATIVE_FONTS)</b>. This will produce vector text in
4276
4268
  * JAVA2D sketches and PDF output in cases where the vector data is
4277
4269
  * available: when the font is still installed, or the font is created via
4278
4270
  * the <b>createFont()</b> function (rather than the Create Font tool).
4279
4271
  *
4280
- *
4272
+ * ( end auto-generated )
4281
4273
  *
4282
4274
  * @webref typography:loading_displaying
4283
4275
  * @param which any variable of the type PFont
@@ -4364,7 +4356,7 @@ public class PGraphics extends PImage implements PConstants {
4364
4356
  * Sets the spacing between lines of text in units of pixels. This setting
4365
4357
  * will be used in all subsequent calls to the <b>text()</b> function.
4366
4358
  *
4367
- *
4359
+ * ( end auto-generated )
4368
4360
  *
4369
4361
  * @webref typography:attributes
4370
4362
  * @param leading the size in pixels for spacing between lines
@@ -4400,7 +4392,7 @@ public class PGraphics extends PImage implements PConstants {
4400
4392
  * not currently optimized for <b>P3D</b>, so if recording shape data, use
4401
4393
  * <b>textMode(MODEL)</b> until you're ready to capture the geometry with <b>beginRaw()</b>.
4402
4394
  *
4403
- *
4395
+ * ( end auto-generated )
4404
4396
  *
4405
4397
  * @webref typography:attributes
4406
4398
  * @param mode either MODEL or SHAPE
@@ -4446,7 +4438,7 @@ public class PGraphics extends PImage implements PConstants {
4446
4438
  * Sets the current font size. This size will be used in all subsequent
4447
4439
  * calls to the <b>text()</b> function. Font size is measured in units of pixels.
4448
4440
  *
4449
- *
4441
+ * ( end auto-generated )
4450
4442
  *
4451
4443
  * @webref typography:attributes
4452
4444
  * @param size the size of the letters in units of pixels
@@ -4510,7 +4502,7 @@ public class PGraphics extends PImage implements PConstants {
4510
4502
  *
4511
4503
  * Calculates and returns the width of any character or text string.
4512
4504
  *
4513
- *
4505
+ * ( end auto-generated )
4514
4506
  *
4515
4507
  * @webref typography:attributes
4516
4508
  * @param str the String of characters to measure
@@ -4593,7 +4585,7 @@ public class PGraphics extends PImage implements PConstants {
4593
4585
  * inside a rectangle, the coordinates are interpreted based on the current
4594
4586
  * <b>rectMode()</b> setting.
4595
4587
  *
4596
- *
4588
+ * ( end auto-generated )
4597
4589
  *
4598
4590
  * @webref typography:loading_displaying
4599
4591
  * @param c the alphanumeric character to be displayed
@@ -4695,27 +4687,21 @@ public class PGraphics extends PImage implements PConstants {
4695
4687
  high += textLeading;
4696
4688
  }
4697
4689
  }
4698
- switch (textAlignY) {
4699
- case CENTER:
4700
- // for a single line, this adds half the textAscent to y
4701
- // for multiple lines, subtract half the additional height
4702
- //y += (textAscent() - textDescent() - high)/2;
4703
- y += (textAscent() - high)/2;
4704
- break;
4705
- case TOP:
4706
- // for a single line, need to add textAscent to y
4707
- // for multiple lines, no different
4708
- y += textAscent();
4709
- break;
4710
- case BOTTOM:
4711
- // for a single line, this is just offset by the descent
4712
- // for multiple lines, subtract leading for each line
4713
- y -= textDescent() + high;
4714
- //} else if (textAlignY == BASELINE) {
4715
- // do nothing
4716
- break;
4717
- default:
4718
- break;
4690
+ if (textAlignY == CENTER) {
4691
+ // for a single line, this adds half the textAscent to y
4692
+ // for multiple lines, subtract half the additional height
4693
+ //y += (textAscent() - textDescent() - high)/2;
4694
+ y += (textAscent() - high)/2;
4695
+ } else if (textAlignY == TOP) {
4696
+ // for a single line, need to add textAscent to y
4697
+ // for multiple lines, no different
4698
+ y += textAscent();
4699
+ } else if (textAlignY == BOTTOM) {
4700
+ // for a single line, this is just offset by the descent
4701
+ // for multiple lines, subtract leading for each line
4702
+ y -= textDescent() + high;
4703
+ //} else if (textAlignY == BASELINE) {
4704
+ // do nothing
4719
4705
  }
4720
4706
 
4721
4707
  // int start = 0;
@@ -4866,33 +4852,27 @@ public class PGraphics extends PImage implements PConstants {
4866
4852
  int lineFitCount = 1 + PApplet.floor((boxHeight - topAndBottom) / textLeading);
4867
4853
  int lineCount = Math.min(textBreakCount, lineFitCount);
4868
4854
 
4869
- switch (textAlignY) {
4870
- case CENTER:
4871
- {
4872
- float lineHigh = textAscent() + textLeading * (lineCount - 1);
4873
- float y = y1 + textAscent() + (boxHeight - lineHigh) / 2;
4874
- for (int i = 0; i < lineCount; i++) {
4875
- textLineAlignImpl(textBuffer, textBreakStart[i], textBreakStop[i], lineX, y);
4876
- y += textLeading;
4877
- } break;
4878
- }
4879
- case BOTTOM:
4880
- {
4881
- float y = y2 - textDescent() - textLeading * (lineCount - 1);
4882
- for (int i = 0; i < lineCount; i++) {
4883
- textLineAlignImpl(textBuffer, textBreakStart[i], textBreakStop[i], lineX, y);
4884
- y += textLeading;
4885
- } break;
4886
- }
4887
- default:
4888
- {
4889
- // TOP or BASELINE just go to the default
4890
- float y = y1 + textAscent();
4891
- for (int i = 0; i < lineCount; i++) {
4892
- textLineAlignImpl(textBuffer, textBreakStart[i], textBreakStop[i], lineX, y);
4893
- y += textLeading;
4894
- } break;
4895
- }
4855
+ if (textAlignY == CENTER) {
4856
+ float lineHigh = textAscent() + textLeading * (lineCount - 1);
4857
+ float y = y1 + textAscent() + (boxHeight - lineHigh) / 2;
4858
+ for (int i = 0; i < lineCount; i++) {
4859
+ textLineAlignImpl(textBuffer, textBreakStart[i], textBreakStop[i], lineX, y);
4860
+ y += textLeading;
4861
+ }
4862
+
4863
+ } else if (textAlignY == BOTTOM) {
4864
+ float y = y2 - textDescent() - textLeading * (lineCount - 1);
4865
+ for (int i = 0; i < lineCount; i++) {
4866
+ textLineAlignImpl(textBuffer, textBreakStart[i], textBreakStop[i], lineX, y);
4867
+ y += textLeading;
4868
+ }
4869
+
4870
+ } else { // TOP or BASELINE just go to the default
4871
+ float y = y1 + textAscent();
4872
+ for (int i = 0; i < lineCount; i++) {
4873
+ textLineAlignImpl(textBuffer, textBreakStart[i], textBreakStop[i], lineX, y);
4874
+ y += textLeading;
4875
+ }
4896
4876
  }
4897
4877
  }
4898
4878
 
@@ -5215,7 +5195,7 @@ public class PGraphics extends PImage implements PConstants {
5215
5195
  * transformations (rotate, scale, translate) and the drawing styles
5216
5196
  * at the same time.
5217
5197
  *
5218
- *
5198
+ * ( end auto-generated )
5219
5199
  *
5220
5200
  * @webref structure
5221
5201
  * @see PGraphics#pop()
@@ -5252,7 +5232,7 @@ public class PGraphics extends PImage implements PConstants {
5252
5232
  * transformations (rotate, scale, translate) and the drawing styles
5253
5233
  * at the same time.
5254
5234
  *
5255
- *
5235
+ * ( end auto-generated )
5256
5236
  *
5257
5237
  * @webref structure
5258
5238
  * @see PGraphics#push()
@@ -5281,7 +5261,7 @@ public class PGraphics extends PImage implements PConstants {
5281
5261
  * the other transformation functions and may be embedded to control the
5282
5262
  * scope of the transformations.
5283
5263
  *
5284
- *
5264
+ * ( end auto-generated )
5285
5265
  *
5286
5266
  * @webref transform
5287
5267
  * @see PGraphics#popMatrix()
@@ -5308,7 +5288,7 @@ public class PGraphics extends PImage implements PConstants {
5308
5288
  * in conjuction with the other transformation functions and may be
5309
5289
  * embedded to control the scope of the transformations.
5310
5290
  *
5311
- *
5291
+ * ( end auto-generated )
5312
5292
  *
5313
5293
  * @webref transform
5314
5294
  * @see PGraphics#pushMatrix()
@@ -5340,7 +5320,7 @@ public class PGraphics extends PImage implements PConstants {
5340
5320
  * transformation is reset when the loop begins again. This function can be
5341
5321
  * further controlled by the <b>pushMatrix()</b> and <b>popMatrix()</b>.
5342
5322
  *
5343
- *
5323
+ * ( end auto-generated )
5344
5324
  *
5345
5325
  * @webref transform
5346
5326
  * @param x left/right translation
@@ -5385,7 +5365,7 @@ public class PGraphics extends PImage implements PConstants {
5385
5365
  * matrix by a rotation matrix. This function can be further controlled by
5386
5366
  * the <b>pushMatrix()</b> and <b>popMatrix()</b>.
5387
5367
  *
5388
- *
5368
+ * ( end auto-generated )
5389
5369
  *
5390
5370
  * @webref transform
5391
5371
  * @param angle angle of rotation specified in radians
@@ -5418,7 +5398,7 @@ public class PGraphics extends PImage implements PConstants {
5418
5398
  * This function requires using P3D as a third parameter to <b>size()</b>
5419
5399
  * as shown in the example above.
5420
5400
  *
5421
- *
5401
+ * ( end auto-generated )
5422
5402
  *
5423
5403
  * @webref transform
5424
5404
  * @param angle angle of rotation specified in radians
@@ -5451,7 +5431,7 @@ public class PGraphics extends PImage implements PConstants {
5451
5431
  * This function requires using P3D as a third parameter to <b>size()</b>
5452
5432
  * as shown in the examples above.
5453
5433
  *
5454
- *
5434
+ * ( end auto-generated )
5455
5435
  *
5456
5436
  * @webref transform
5457
5437
  * @param angle angle of rotation specified in radians
@@ -5484,7 +5464,7 @@ public class PGraphics extends PImage implements PConstants {
5484
5464
  * This function requires using P3D as a third parameter to <b>size()</b>
5485
5465
  * as shown in the examples above.
5486
5466
  *
5487
- *
5467
+ * ( end auto-generated )
5488
5468
  *
5489
5469
  * @webref transform
5490
5470
  * @param angle angle of rotation specified in radians
@@ -5530,7 +5510,7 @@ public class PGraphics extends PImage implements PConstants {
5530
5510
  * parameter for <b>size()</b> as shown in the example above. This function
5531
5511
  * can be further controlled by <b>pushMatrix()</b> and <b>popMatrix()</b>.
5532
5512
  *
5533
- *
5513
+ * ( end auto-generated )
5534
5514
  *
5535
5515
  * @webref transform
5536
5516
  * @param s percentage to scale the object
@@ -5588,7 +5568,7 @@ public class PGraphics extends PImage implements PConstants {
5588
5568
  * matrix by a rotation matrix. This function can be further controlled by
5589
5569
  * the <b>pushMatrix()</b> and <b>popMatrix()</b> functions.
5590
5570
  *
5591
- *
5571
+ * ( end auto-generated )
5592
5572
  *
5593
5573
  * @webref transform
5594
5574
  * @param angle angle of shear specified in radians
@@ -5622,7 +5602,7 @@ public class PGraphics extends PImage implements PConstants {
5622
5602
  * matrix by a rotation matrix. This function can be further controlled by
5623
5603
  * the <b>pushMatrix()</b> and <b>popMatrix()</b> functions.
5624
5604
  *
5625
- *
5605
+ * ( end auto-generated )
5626
5606
  *
5627
5607
  * @webref transform
5628
5608
  * @param angle angle of shear specified in radians
@@ -5649,7 +5629,7 @@ public class PGraphics extends PImage implements PConstants {
5649
5629
  * Replaces the current matrix with the identity matrix. The equivalent
5650
5630
  * function in OpenGL is glLoadIdentity().
5651
5631
  *
5652
- *
5632
+ * ( end auto-generated )
5653
5633
  *
5654
5634
  * @webref transform
5655
5635
  * @see PGraphics#pushMatrix()
@@ -5669,7 +5649,7 @@ public class PGraphics extends PImage implements PConstants {
5669
5649
  * inverse of the transform, so avoid it whenever possible. The equivalent
5670
5650
  * function in OpenGL is glMultMatrix().
5671
5651
  *
5672
- *
5652
+ * ( end auto-generated )
5673
5653
  *
5674
5654
  * @webref transform
5675
5655
  * @source
@@ -5800,7 +5780,7 @@ public class PGraphics extends PImage implements PConstants {
5800
5780
  * Prints the current matrix to the Console (the text window at the bottom
5801
5781
  * of Processing).
5802
5782
  *
5803
- *
5783
+ * ( end auto-generated )
5804
5784
  *
5805
5785
  * @webref transform
5806
5786
  * @see PGraphics#pushMatrix()
@@ -5831,13 +5811,13 @@ public class PGraphics extends PImage implements PConstants {
5831
5811
  * <b>draw()</b> (so that transformations happen afterwards), and the
5832
5812
  * <b>camera()</b> function can be used after <b>beginCamera()</b> if you
5833
5813
  * want to reset the camera before applying transformations.
5834
- This function sets the matrix mode to the camera matrix so calls such
5814
+ * This function sets the matrix mode to the camera matrix so calls such
5835
5815
  * as <b>translate()</b>, <b>rotate()</b>, applyMatrix() and resetMatrix()
5836
5816
  * affect the camera. <b>beginCamera()</b> should always be used with a
5837
5817
  * following <b>endCamera()</b> and pairs of <b>beginCamera()</b> and
5838
5818
  * <b>endCamera()</b> cannot be nested.
5839
5819
  *
5840
- *
5820
+ * ( end auto-generated )
5841
5821
  *
5842
5822
  * @webref lights_camera:camera
5843
5823
  * @see PGraphics#camera()
@@ -5858,7 +5838,7 @@ public class PGraphics extends PImage implements PConstants {
5858
5838
  * advanced customization of the camera space. Please see the reference for
5859
5839
  * <b>beginCamera()</b> for a description of how the functions are used.
5860
5840
  *
5861
- *
5841
+ * ( end auto-generated )
5862
5842
  *
5863
5843
  * @webref lights_camera:camera
5864
5844
  * @see PGraphics#beginCamera()
@@ -5881,7 +5861,7 @@ public class PGraphics extends PImage implements PConstants {
5881
5861
  * 180.0), width/2.0, height/2.0, 0, 0, 1, 0)</b>. This function is similar
5882
5862
  * to <b>gluLookAt()</b> in OpenGL, but it first clears the current camera settings.
5883
5863
  *
5884
- *
5864
+ * ( end auto-generated )
5885
5865
  *
5886
5866
  * @webref lights_camera:camera
5887
5867
  * @see PGraphics#beginCamera()
@@ -5915,7 +5895,7 @@ public class PGraphics extends PImage implements PConstants {
5915
5895
  * Prints the current camera matrix to the Console (the text window at the
5916
5896
  * bottom of Processing).
5917
5897
  *
5918
- *
5898
+ * ( end auto-generated )
5919
5899
  * @webref lights_camera:camera
5920
5900
  * @see PGraphics#camera(float, float, float, float, float, float, float, float, float)
5921
5901
  */
@@ -5941,7 +5921,7 @@ public class PGraphics extends PImage implements PConstants {
5941
5921
  * parameters are given, the default is used: ortho(0, width, 0, height,
5942
5922
  * -10, 10).
5943
5923
  *
5944
- *
5924
+ * ( end auto-generated )
5945
5925
  *
5946
5926
  * @webref lights_camera:camera
5947
5927
  */
@@ -5984,7 +5964,7 @@ public class PGraphics extends PImage implements PConstants {
5984
5964
  * default values are: perspective(PI/3.0, width/height, cameraZ/10.0,
5985
5965
  * cameraZ*10.0) where cameraZ is ((height/2.0) / tan(PI*60.0/360.0));
5986
5966
  *
5987
- *
5967
+ * ( end auto-generated )
5988
5968
  *
5989
5969
  * @webref lights_camera:camera
5990
5970
  */
@@ -6009,7 +5989,7 @@ public class PGraphics extends PImage implements PConstants {
6009
5989
  * glFrustum, except it wipes out the current perspective matrix rather
6010
5990
  * than muliplying itself with it.
6011
5991
  *
6012
- *
5992
+ * ( end auto-generated )
6013
5993
  *
6014
5994
  * @webref lights_camera:camera
6015
5995
  * @param left left coordinate of the clipping plane
@@ -6035,7 +6015,7 @@ public class PGraphics extends PImage implements PConstants {
6035
6015
  * Prints the current projection matrix to the Console (the text window at
6036
6016
  * the bottom of Processing).
6037
6017
  *
6038
- *
6018
+ * ( end auto-generated )
6039
6019
  *
6040
6020
  * @webref lights_camera:camera
6041
6021
  * @see PGraphics#camera(float, float, float, float, float, float, float, float, float)
@@ -6057,7 +6037,7 @@ public class PGraphics extends PImage implements PConstants {
6057
6037
  * Takes a three-dimensional X, Y, Z position and returns the X value for
6058
6038
  * where it will appear on a (two-dimensional) screen.
6059
6039
  *
6060
- *
6040
+ * ( end auto-generated )
6061
6041
  *
6062
6042
  * @webref lights_camera:coordinates
6063
6043
  * @param x 3D x-coordinate to be mapped
@@ -6077,7 +6057,7 @@ public class PGraphics extends PImage implements PConstants {
6077
6057
  * Takes a three-dimensional X, Y, Z position and returns the Y value for
6078
6058
  * where it will appear on a (two-dimensional) screen.
6079
6059
  *
6080
- *
6060
+ * ( end auto-generated )
6081
6061
  *
6082
6062
  * @webref lights_camera:coordinates
6083
6063
  * @param x 3D x-coordinate to be mapped
@@ -6093,6 +6073,7 @@ public class PGraphics extends PImage implements PConstants {
6093
6073
 
6094
6074
  /**
6095
6075
  * @param z 3D z-coordinate to be mapped
6076
+ * @return
6096
6077
  */
6097
6078
  public float screenX(float x, float y, float z) {
6098
6079
  showMissingWarning("screenX");
@@ -6114,10 +6095,10 @@ public class PGraphics extends PImage implements PConstants {
6114
6095
  * ( begin auto-generated from screenZ.xml )
6115
6096
  *
6116
6097
  * Takes a three-dimensional X, Y, Z position and returns the Z value for
6117
- * where it will appear on a (two-dimensional) screen.
6098
+ * where it will appear on a (two-dimensional) screen.( end auto-generated )
6118
6099
  *
6119
- *
6120
6100
  *
6101
+ * @return
6121
6102
  * @webref lights_camera:coordinates
6122
6103
  * @param x 3D x-coordinate to be mapped
6123
6104
  * @param y 3D y-coordinate to be mapped
@@ -6134,21 +6115,20 @@ public class PGraphics extends PImage implements PConstants {
6134
6115
  /**
6135
6116
  * ( begin auto-generated from modelX.xml )
6136
6117
  *
6137
- * Returns the three-dimensional X, Y, Z position in model space. This
6138
- * returns the X value for a given coordinate based on the current set of
6139
- * transformations (scale, rotate, translate, etc.) The X value can be used
6140
- * to place an object in space relative to the location of the original
6141
- * point once the transformations are no longer in use.
6142
- *
6143
- * In the example, the <b>modelX()</b>, <b>modelY()</b>, and
6118
+ * Returns the three-dimensional X, Y, Z position in model space.This
6119
+ returns the X value for a given coordinate based on the current set of
6120
+ transformations (scale, rotate, translate, etc.) The X value can be used
6121
+ to place an object in space relative to the location of the original
6122
+ point once the transformations are no longer in use. In the example, the <b>modelX()</b>, <b>modelY()</b>, and
6144
6123
  * <b>modelZ()</b> functions record the location of a box in space after
6145
6124
  * being placed using a series of translate and rotate commands. After
6146
6125
  * popMatrix() is called, those transformations no longer apply, but the
6147
6126
  * (x, y, z) coordinate returned by the model functions is used to place
6148
6127
  * another box in the same location.
6149
6128
  *
6150
- *
6129
+ * ( end auto-generated )
6151
6130
  *
6131
+ * @return
6152
6132
  * @webref lights_camera:coordinates
6153
6133
  * @param x 3D x-coordinate to be mapped
6154
6134
  * @param y 3D y-coordinate to be mapped
@@ -6165,21 +6145,20 @@ public class PGraphics extends PImage implements PConstants {
6165
6145
  /**
6166
6146
  * ( begin auto-generated from modelY.xml )
6167
6147
  *
6168
- * Returns the three-dimensional X, Y, Z position in model space. This
6169
- * returns the Y value for a given coordinate based on the current set of
6170
- * transformations (scale, rotate, translate, etc.) The Y value can be used
6171
- * to place an object in space relative to the location of the original
6172
- * point once the transformations are no longer in use.
6173
- *
6174
- * In the example, the <b>modelX()</b>, <b>modelY()</b>, and
6148
+ * Returns the three-dimensional X, Y, Z position in model space.This
6149
+ returns the Y value for a given coordinate based on the current set of
6150
+ transformations (scale, rotate, translate, etc.) The Y value can be used
6151
+ to place an object in space relative to the location of the original
6152
+ point once the transformations are no longer in use. In the example, the <b>modelX()</b>, <b>modelY()</b>, and
6175
6153
  * <b>modelZ()</b> functions record the location of a box in space after
6176
6154
  * being placed using a series of translate and rotate commands. After
6177
6155
  * popMatrix() is called, those transformations no longer apply, but the
6178
6156
  * (x, y, z) coordinate returned by the model functions is used to place
6179
6157
  * another box in the same location.
6180
6158
  *
6181
- *
6159
+ * ( end auto-generated )
6182
6160
  *
6161
+ * @return
6183
6162
  * @webref lights_camera:coordinates
6184
6163
  * @param x 3D x-coordinate to be mapped
6185
6164
  * @param y 3D y-coordinate to be mapped
@@ -6196,21 +6175,20 @@ public class PGraphics extends PImage implements PConstants {
6196
6175
  /**
6197
6176
  * ( begin auto-generated from modelZ.xml )
6198
6177
  *
6199
- * Returns the three-dimensional X, Y, Z position in model space. This
6200
- * returns the Z value for a given coordinate based on the current set of
6201
- * transformations (scale, rotate, translate, etc.) The Z value can be used
6202
- * to place an object in space relative to the location of the original
6203
- * point once the transformations are no longer in use.
6204
- *
6205
- * In the example, the <b>modelX()</b>, <b>modelY()</b>, and
6178
+ * Returns the three-dimensional X, Y, Z position in model space.This
6179
+ returns the Z value for a given coordinate based on the current set of
6180
+ transformations (scale, rotate, translate, etc.) The Z value can be used
6181
+ to place an object in space relative to the location of the original
6182
+ point once the transformations are no longer in use. In the example, the <b>modelX()</b>, <b>modelY()</b>, and
6206
6183
  * <b>modelZ()</b> functions record the location of a box in space after
6207
6184
  * being placed using a series of translate and rotate commands. After
6208
6185
  * popMatrix() is called, those transformations no longer apply, but the
6209
6186
  * (x, y, z) coordinate returned by the model functions is used to place
6210
6187
  * another box in the same location.
6211
6188
  *
6212
- *
6189
+ * ( end auto-generated )
6213
6190
  *
6191
+ * @return
6214
6192
  * @webref lights_camera:coordinates
6215
6193
  * @param x 3D x-coordinate to be mapped
6216
6194
  * @param y 3D y-coordinate to be mapped
@@ -6247,7 +6225,7 @@ public class PGraphics extends PImage implements PConstants {
6247
6225
  * textAlign(), textFont(), textMode(), textSize(), textLeading(),
6248
6226
  * emissive(), specular(), shininess(), ambient()
6249
6227
  *
6250
- *
6228
+ * ( end auto-generated )
6251
6229
  *
6252
6230
  * @webref structure
6253
6231
  * @see PGraphics#popStyle()
@@ -6274,7 +6252,7 @@ public class PGraphics extends PImage implements PConstants {
6274
6252
  * <b>pushStyle()</b> and <b>popStyle()</b> functions can be embedded to
6275
6253
  * provide more control (see the second example above for a demonstration.)
6276
6254
  *
6277
- *
6255
+ * ( end auto-generated )
6278
6256
  *
6279
6257
  * @webref structure
6280
6258
  * @see PGraphics#pushStyle()
@@ -6442,7 +6420,7 @@ public class PGraphics extends PImage implements PConstants {
6442
6420
  * operating system's OpenGL implementation. For instance, the thickness
6443
6421
  * may not go higher than 10 pixels.
6444
6422
  *
6445
- *
6423
+ * ( end auto-generated )
6446
6424
  *
6447
6425
  * @webref shape:attributes
6448
6426
  * @param weight the weight (in pixels) of the stroke
@@ -6467,7 +6445,7 @@ public class PGraphics extends PImage implements PConstants {
6467
6445
  * Issue 123</a>). More information about the renderers can be found in the
6468
6446
  * <b>size()</b> reference.
6469
6447
  *
6470
- *
6448
+ * ( end auto-generated )
6471
6449
  *
6472
6450
  * @webref shape:attributes
6473
6451
  * @param join either MITER, BEVEL, ROUND
@@ -6491,7 +6469,7 @@ public class PGraphics extends PImage implements PConstants {
6491
6469
  * Issue 123</a>). More information about the renderers can be found in the
6492
6470
  * <b>size()</b> reference.
6493
6471
  *
6494
- *
6472
+ * ( end auto-generated )
6495
6473
  *
6496
6474
  * @webref shape:attributes
6497
6475
  * @param cap either SQUARE, PROJECT, or ROUND
@@ -6517,7 +6495,7 @@ public class PGraphics extends PImage implements PConstants {
6517
6495
  * Disables drawing the stroke (outline). If both <b>noStroke()</b> and
6518
6496
  * <b>noFill()</b> are called, nothing will be drawn to the screen.
6519
6497
  *
6520
- *
6498
+ * ( end auto-generated )
6521
6499
  *
6522
6500
  * @webref color:setting
6523
6501
  * @see PGraphics#stroke(int, float)
@@ -6549,7 +6527,7 @@ public class PGraphics extends PImage implements PConstants {
6549
6527
  * current maximum value as specified by <b>colorMode()</b>. The default
6550
6528
  * maximum value is 255.
6551
6529
  *
6552
- *
6530
+ * ( end auto-generated )
6553
6531
  *
6554
6532
  * @param rgb color value in hexadecimal notation
6555
6533
  * @see PGraphics#noStroke()
@@ -6637,7 +6615,7 @@ public class PGraphics extends PImage implements PConstants {
6637
6615
  * Removes the current fill value for displaying images and reverts to
6638
6616
  * displaying images with their original hues.
6639
6617
  *
6640
- *
6618
+ * ( end auto-generated )
6641
6619
  *
6642
6620
  * @webref image:loading_displaying
6643
6621
  * @usage web_application
@@ -6675,7 +6653,7 @@ public class PGraphics extends PImage implements PConstants {
6675
6653
  * The <b>tint()</b> function is also used to control the coloring of
6676
6654
  * textures in 3D.
6677
6655
  *
6678
- *
6656
+ * ( end auto-generated )
6679
6657
  *
6680
6658
  * @webref image:loading_displaying
6681
6659
  * @usage web_application
@@ -6756,7 +6734,7 @@ public class PGraphics extends PImage implements PConstants {
6756
6734
  * Disables filling geometry. If both <b>noStroke()</b> and <b>noFill()</b>
6757
6735
  * are called, nothing will be drawn to the screen.
6758
6736
  *
6759
- *
6737
+ * ( end auto-generated )
6760
6738
  *
6761
6739
  * @webref color:setting
6762
6740
  * @usage web_application
@@ -6792,7 +6770,7 @@ public class PGraphics extends PImage implements PConstants {
6792
6770
  *
6793
6771
  * To change the color of an image (or a texture), use tint().
6794
6772
  *
6795
- *
6773
+ * ( end auto-generated )
6796
6774
  *
6797
6775
  * @webref color:setting
6798
6776
  * @usage web_application
@@ -6881,7 +6859,7 @@ public class PGraphics extends PImage implements PConstants {
6881
6859
  * reflect. Used in combination with <b>emissive()</b>, <b>specular()</b>,
6882
6860
  * and <b>shininess()</b> in setting the material properties of shapes.
6883
6861
  *
6884
- *
6862
+ * ( end auto-generated )
6885
6863
  *
6886
6864
  * @webref lights_camera:material_properties
6887
6865
  * @usage web_application
@@ -6939,7 +6917,7 @@ public class PGraphics extends PImage implements PConstants {
6939
6917
  * with <b>emissive()</b>, <b>ambient()</b>, and <b>shininess()</b> in
6940
6918
  * setting the material properties of shapes.
6941
6919
  *
6942
- *
6920
+ * ( end auto-generated )
6943
6921
  *
6944
6922
  * @webref lights_camera:material_properties
6945
6923
  * @usage web_application
@@ -6999,7 +6977,7 @@ public class PGraphics extends PImage implements PConstants {
6999
6977
  * with <b>ambient()</b>, <b>specular()</b>, and <b>emissive()</b> in
7000
6978
  * setting the material properties of shapes.
7001
6979
  *
7002
- *
6980
+ * ( end auto-generated )
7003
6981
  *
7004
6982
  * @webref lights_camera:material_properties
7005
6983
  * @usage web_application
@@ -7020,7 +6998,7 @@ public class PGraphics extends PImage implements PConstants {
7020
6998
  * <b>specular()</b>, and <b>shininess()</b> in setting the material
7021
6999
  * properties of shapes.
7022
7000
  *
7023
- *
7001
+ * ( end auto-generated )
7024
7002
  *
7025
7003
  * @webref lights_camera:material_properties
7026
7004
  * @usage web_application
@@ -7090,7 +7068,7 @@ public class PGraphics extends PImage implements PConstants {
7090
7068
  * looping program will cause them to only have an effect the first time
7091
7069
  * through the loop.
7092
7070
  *
7093
- *
7071
+ * ( end auto-generated )
7094
7072
  *
7095
7073
  * @webref lights_camera:lights
7096
7074
  * @usage web_application
@@ -7112,7 +7090,7 @@ public class PGraphics extends PImage implements PConstants {
7112
7090
  * lighting so that 2D geometry (which does not require lighting) can be
7113
7091
  * drawn after a set of lighted 3D geometry.
7114
7092
  *
7115
- *
7093
+ * ( end auto-generated )
7116
7094
  *
7117
7095
  * @webref lights_camera:lights
7118
7096
  * @usage web_application
@@ -7134,7 +7112,7 @@ public class PGraphics extends PImage implements PConstants {
7134
7112
  * have an effect the first time through the loop. The effect of the
7135
7113
  * parameters is determined by the current color mode.
7136
7114
  *
7137
- *
7115
+ * ( end auto-generated )
7138
7116
  *
7139
7117
  * @webref lights_camera:lights
7140
7118
  * @usage web_application
@@ -7175,7 +7153,7 @@ public class PGraphics extends PImage implements PConstants {
7175
7153
  * direction the light is facing. For example, setting <b>ny</b> to -1 will
7176
7154
  * cause the geometry to be lit from below (the light is facing directly upward).
7177
7155
  *
7178
- *
7156
+ * ( end auto-generated )
7179
7157
  *
7180
7158
  * @webref lights_camera:lights
7181
7159
  * @usage web_application
@@ -7206,7 +7184,7 @@ public class PGraphics extends PImage implements PConstants {
7206
7184
  * mode. The <b>x</b>, <b>y</b>, and <b>z</b> parameters set the position
7207
7185
  * of the light.
7208
7186
  *
7209
- *
7187
+ * ( end auto-generated )
7210
7188
  *
7211
7189
  * @webref lights_camera:lights
7212
7190
  * @usage web_application
@@ -7239,7 +7217,7 @@ public class PGraphics extends PImage implements PConstants {
7239
7217
  * direction or light. The <b>angle</b> parameter affects angle of the
7240
7218
  * spotlight cone.
7241
7219
  *
7242
- *
7220
+ * ( end auto-generated )
7243
7221
  *
7244
7222
  * @webref lights_camera:lights
7245
7223
  * @usage web_application
@@ -7282,7 +7260,7 @@ public class PGraphics extends PImage implements PConstants {
7282
7260
  * and falloff. You can think of it as a point light that doesn't care
7283
7261
  * which direction a surface is facing.
7284
7262
  *
7285
- *
7263
+ * ( end auto-generated )
7286
7264
  *
7287
7265
  * @webref lights_camera:lights
7288
7266
  * @usage web_application
@@ -7310,7 +7288,7 @@ public class PGraphics extends PImage implements PConstants {
7310
7288
  * specular material qualities set through the <b>specular()</b> and
7311
7289
  * <b>shininess()</b> functions.
7312
7290
  *
7313
- *
7291
+ * ( end auto-generated )
7314
7292
  *
7315
7293
  * @webref lights_camera:lights
7316
7294
  * @usage web_application
@@ -7351,7 +7329,7 @@ public class PGraphics extends PImage implements PConstants {
7351
7329
  * It is not possible to use transparency (alpha) in background colors with
7352
7330
  * the main drawing surface, however they will work properly with <b>createGraphics()</b>.
7353
7331
  *
7354
- *
7332
+ * ( end auto-generated )
7355
7333
  *
7356
7334
  * <h3>Advanced</h3>
7357
7335
  * <p>Clear the background with a color that includes an alpha value. This can
@@ -7571,7 +7549,7 @@ public class PGraphics extends PImage implements PConstants {
7571
7549
  * are specified between 0 and 1. The limits for defining colors are
7572
7550
  * altered by setting the parameters range1, range2, range3, and range 4.
7573
7551
  *
7574
- *
7552
+ * ( end auto-generated )
7575
7553
  *
7576
7554
  * @webref color:setting
7577
7555
  * @usage web_application
@@ -7909,7 +7887,7 @@ public class PGraphics extends PImage implements PConstants {
7909
7887
  *
7910
7888
  * Extracts the alpha value from a color.
7911
7889
  *
7912
- *
7890
+ * ( end auto-generated )
7913
7891
  * @webref color:creating_reading
7914
7892
  * @usage web_application
7915
7893
  * @param rgb any value of the color datatype
@@ -7936,11 +7914,11 @@ public class PGraphics extends PImage implements PConstants {
7936
7914
  * is easy to use and undestand, but is slower than another technique. To
7937
7915
  * achieve the same results when working in <b>colorMode(RGB, 255)</b>, but
7938
7916
  * with greater speed, use the &gt;&gt; (right shift) operator with a bit
7939
- * mask. For example, the following two lines of code are equivalent:
7940
- <pre>float r1 = red(myColor);float r2 = myColor &gt;&gt; 16
7917
+ * mask. For example, the following two lines of code are equivalent:<br
7918
+ * /><pre>float r1 = red(myColor);float r2 = myColor &gt;&gt; 16
7941
7919
  * &amp; 0xFF;</pre>
7942
7920
  *
7943
- *
7921
+ * ( end auto-generated )
7944
7922
  *
7945
7923
  * @webref color:creating_reading
7946
7924
  * @usage web_application
@@ -7973,7 +7951,7 @@ public class PGraphics extends PImage implements PConstants {
7973
7951
  * are equivalent:<pre>float r1 = green(myColor);float r2 =
7974
7952
  * myColor &gt;&gt; 8 &amp; 0xFF;</pre>
7975
7953
  *
7976
- *
7954
+ * ( end auto-generated )
7977
7955
  *
7978
7956
  * @webref color:creating_reading
7979
7957
  * @usage web_application
@@ -8006,7 +7984,7 @@ public class PGraphics extends PImage implements PConstants {
8006
7984
  * equivalent:<pre>float r1 = blue(myColor);float r2 = myColor
8007
7985
  * &amp; 0xFF;</pre>
8008
7986
  *
8009
- *
7987
+ * ( end auto-generated )
8010
7988
  *
8011
7989
  * @webref color:creating_reading
8012
7990
  * @usage web_application
@@ -8029,9 +8007,9 @@ public class PGraphics extends PImage implements PConstants {
8029
8007
  /**
8030
8008
  * ( begin auto-generated from hue.xml )
8031
8009
  *
8032
- * Extracts the hue value from a color.
8010
+ * Extracts the hue value from a color.( end auto-generated )
8033
8011
  *
8034
- *
8012
+ * @return
8035
8013
  * @webref color:creating_reading
8036
8014
  * @usage web_application
8037
8015
  * @param rgb any value of the color datatype
@@ -8055,9 +8033,9 @@ public class PGraphics extends PImage implements PConstants {
8055
8033
  /**
8056
8034
  * ( begin auto-generated from saturation.xml )
8057
8035
  *
8058
- * Extracts the saturation value from a color.
8036
+ * Extracts the saturation value from a color.( end auto-generated )
8059
8037
  *
8060
- *
8038
+ * @return
8061
8039
  * @webref color:creating_reading
8062
8040
  * @usage web_application
8063
8041
  * @param rgb any value of the color datatype
@@ -8081,10 +8059,10 @@ public class PGraphics extends PImage implements PConstants {
8081
8059
  /**
8082
8060
  * ( begin auto-generated from brightness.xml )
8083
8061
  *
8084
- * Extracts the brightness value from a color.
8062
+ * Extracts the brightness value from a color.( end auto-generated )
8085
8063
  *
8086
- *
8087
8064
  *
8065
+ * @return
8088
8066
  * @webref color:creating_reading
8089
8067
  * @usage web_application
8090
8068
  * @param rgb any value of the color datatype
@@ -8121,7 +8099,7 @@ public class PGraphics extends PImage implements PConstants {
8121
8099
  * values where 0.0 equal to the first point, 0.1 is very near the first
8122
8100
  * point, 0.5 is half-way in between, etc.
8123
8101
  *
8124
- *
8102
+ * ( end auto-generated )
8125
8103
  *
8126
8104
  * @webref color:creating_reading
8127
8105
  * @usage web_application
@@ -8220,6 +8198,7 @@ public class PGraphics extends PImage implements PConstants {
8220
8198
 
8221
8199
  /**
8222
8200
  * Record individual lines and triangles by echoing them to another renderer.
8201
+ * @param rawGraphics
8223
8202
  */
8224
8203
  public void beginRaw(PGraphics rawGraphics) { // ignore
8225
8204
  this.raw = rawGraphics;
@@ -8277,6 +8256,8 @@ public class PGraphics extends PImage implements PConstants {
8277
8256
 
8278
8257
  /**
8279
8258
  * Version of showWarning() that takes a parsed String.
8259
+ * @param msg
8260
+ * @param args
8280
8261
  */
8281
8262
  static public void showWarning(String msg, Object... args) { // ignore
8282
8263
  showWarning(String.format(msg, args));
@@ -8308,6 +8289,7 @@ public class PGraphics extends PImage implements PConstants {
8308
8289
 
8309
8290
  /**
8310
8291
  * Display a warning that the specified method is simply unavailable.
8292
+ * @param method
8311
8293
  */
8312
8294
  static public void showMethodWarning(String method) {
8313
8295
  showWarning(method + "() is not available with this renderer.");
@@ -8316,8 +8298,9 @@ public class PGraphics extends PImage implements PConstants {
8316
8298
 
8317
8299
  /**
8318
8300
  * Error that a particular variation of a method is unavailable (even though
8319
- * other variations are). For instance, if vertex(x, y, u, v) is not
8320
- * available, but vertex(x, y) is just fine.
8301
+ * other variations are).For instance, if vertex(x, y, u, v) is not
8302
+ available, but vertex(x, y) is just fine.
8303
+ * @param str
8321
8304
  */
8322
8305
  static public void showVariationWarning(String str) {
8323
8306
  showWarning(str + " is not available with this renderer.");
@@ -8328,6 +8311,7 @@ public class PGraphics extends PImage implements PConstants {
8328
8311
  * Display a warning that the specified method is not implemented, meaning
8329
8312
  * that it could be either a completely missing function, although other
8330
8313
  * variations of it may still work properly.
8314
+ * @param method
8331
8315
  */
8332
8316
  static public void showMissingWarning(String method) {
8333
8317
  showWarning(method + "(), or this particular variation of it, " +
@@ -8336,9 +8320,10 @@ public class PGraphics extends PImage implements PConstants {
8336
8320
 
8337
8321
 
8338
8322
  /**
8339
- * Show an renderer-related exception that halts the program. Currently just
8340
- * wraps the message as a RuntimeException and throws it, but might do
8341
- * something more specific might be used in the future.
8323
+ * Show an renderer-related exception that halts the program.Currently just
8324
+ wraps the message as a RuntimeException and throws it, but might do
8325
+ something more specific might be used in the future.
8326
+ * @param msg
8342
8327
  */
8343
8328
  static public void showException(String msg) { // ignore
8344
8329
  throw new RuntimeException(msg);
@@ -8347,6 +8332,7 @@ public class PGraphics extends PImage implements PConstants {
8347
8332
 
8348
8333
  /**
8349
8334
  * Same as below, but defaults to a 12 point font, just as MacWrite intended.
8335
+ * @param method
8350
8336
  */
8351
8337
  protected void defaultFontOrDeath(String method) {
8352
8338
  defaultFontOrDeath(method, 12);
@@ -8357,6 +8343,8 @@ public class PGraphics extends PImage implements PConstants {
8357
8343
  * First try to create a default font, but if that's not possible, throw
8358
8344
  * an exception that halts the program because textFont() has not been used
8359
8345
  * prior to the specified method.
8346
+ * @param method
8347
+ * @param size
8360
8348
  */
8361
8349
  protected void defaultFontOrDeath(String method, float size) {
8362
8350
  if (parent != null) {