picrate 1.3.0-java → 2.0.0.pre-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.
- checksums.yaml +4 -4
- data/.mvn/extensions.xml +1 -1
- data/.mvn/wrapper/maven-wrapper.properties +2 -2
- data/CHANGELOG.md +2 -1
- data/Gemfile +3 -1
- data/README.md +4 -2
- data/Rakefile +8 -4
- data/bin/picrate +3 -1
- data/docs/_posts/2019-11-11-getting_started_buster.md +1 -1
- data/lib/picrate.rb +1 -1
- data/lib/picrate/app.rb +10 -3
- data/lib/picrate/creators/parameters.rb +8 -8
- data/lib/picrate/creators/sketch_factory.rb +5 -3
- data/lib/picrate/helper_methods.rb +21 -21
- data/lib/picrate/helpers/numeric.rb +2 -0
- data/lib/picrate/library.rb +5 -1
- data/lib/picrate/library_loader.rb +2 -0
- data/lib/picrate/native_folder.rb +6 -4
- data/lib/picrate/native_loader.rb +3 -0
- data/lib/picrate/runner.rb +1 -0
- data/lib/picrate/version.rb +1 -1
- data/library/boids/boids.rb +17 -8
- data/library/chooser/chooser.rb +10 -9
- data/library/color_group/color_group.rb +2 -0
- data/library/control_panel/control_panel.rb +7 -4
- data/library/dxf/dxf.rb +2 -0
- data/library/library_proxy/library_proxy.rb +2 -0
- data/library/net/net.rb +2 -0
- data/library/slider/slider.rb +24 -23
- data/library/vector_utils/vector_utils.rb +4 -0
- data/library/video_event/video_event.rb +2 -0
- data/picrate.gemspec +14 -12
- data/pom.rb +15 -15
- data/pom.xml +5 -5
- data/src/main/java/monkstone/ColorUtil.java +1 -1
- data/src/main/java/monkstone/MathToolModule.java +1 -1
- data/src/main/java/monkstone/PicrateLibrary.java +8 -8
- data/src/main/java/monkstone/fastmath/Deglut.java +16 -16
- data/src/main/java/monkstone/filechooser/Chooser.java +1 -1
- data/src/main/java/monkstone/noise/SimplexNoise.java +3 -3
- data/src/main/java/monkstone/slider/CustomHorizontalSlider.java +1 -1
- data/src/main/java/monkstone/slider/CustomVerticalSlider.java +1 -1
- data/src/main/java/monkstone/slider/SimpleHorizontalSlider.java +12 -12
- data/src/main/java/monkstone/slider/SimpleVerticalSlider.java +1 -1
- data/src/main/java/monkstone/slider/SliderBar.java +1 -1
- data/src/main/java/monkstone/slider/SliderGroup.java +1 -1
- data/src/main/java/monkstone/slider/WheelHandler.java +1 -1
- data/src/main/java/monkstone/vecmath/package-info.java +1 -1
- data/src/main/java/monkstone/vecmath/vec2/Vec2.java +1 -1
- data/src/main/java/monkstone/vecmath/vec3/Vec3.java +1 -1
- data/src/main/java/monkstone/videoevent/CaptureEvent.java +1 -1
- data/src/main/java/monkstone/videoevent/MovieEvent.java +1 -1
- data/src/main/java/monkstone/videoevent/package-info.java +1 -1
- data/src/main/java/processing/awt/PGraphicsJava2D.java +11 -13
- data/src/main/java/processing/awt/PSurfaceAWT.java +0 -20
- data/src/main/java/processing/core/PApplet.java +1949 -2247
- data/src/main/java/processing/core/PConstants.java +180 -180
- data/src/main/java/processing/core/PFont.java +2 -2
- data/src/main/java/processing/core/PGraphics.java +90 -90
- data/src/main/java/processing/core/PImage.java +65 -65
- data/src/main/java/processing/core/PMatrix.java +39 -39
- data/src/main/java/processing/core/PSurface.java +37 -37
- data/src/main/java/processing/core/PVector.java +2 -2
- data/src/main/java/processing/data/FloatDict.java +251 -284
- data/src/main/java/processing/data/TableRow.java +32 -32
- data/src/main/java/processing/dxf/RawDXF.java +3 -3
- data/src/main/java/processing/net/Client.java +1 -1
- data/src/main/java/processing/opengl/PGL.java +3884 -3950
- data/src/main/java/processing/opengl/PGraphicsOpenGL.java +38 -21
- data/src/main/java/processing/opengl/PSurfaceJOGL.java +42 -61
- data/test/color_group_test.rb +4 -4
- data/test/deglut_spec_test.rb +2 -0
- data/test/helper_methods_test.rb +41 -13
- data/test/math_tool_test.rb +46 -37
- data/test/respond_to_test.rb +5 -3
- data/test/sketches/key_event.rb +2 -2
- data/test/sketches/library/my_library/my_library.rb +3 -0
- data/test/test_helper.rb +2 -0
- data/test/vecmath_spec_test.rb +30 -19
- data/vendors/Rakefile +2 -2
- metadata +29 -17
@@ -384,7 +384,7 @@ public class PFont implements PConstants {
|
|
384
384
|
// not a roman font, so throw an error and ask to re-build.
|
385
385
|
// that way can avoid a bunch of error checking hacks in here.
|
386
386
|
if ((ascent == 0) && (descent == 0)) {
|
387
|
-
throw new RuntimeException("Please use \"
|
387
|
+
throw new RuntimeException("Please use \"create_font\" to "
|
388
388
|
+ "re-create this font.");
|
389
389
|
}
|
390
390
|
|
@@ -945,7 +945,7 @@ public class PFont implements PConstants {
|
|
945
945
|
readHeader(is);
|
946
946
|
}
|
947
947
|
|
948
|
-
protected void readHeader(DataInputStream is) throws IOException {
|
948
|
+
protected final void readHeader(DataInputStream is) throws IOException {
|
949
949
|
value = is.readInt();
|
950
950
|
height = is.readInt();
|
951
951
|
width = is.readInt();
|
@@ -1088,7 +1088,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
1088
1088
|
* obscure rendering features that cannot be implemented in a consistent
|
1089
1089
|
* manner across renderers. Many options will often graduate to standard
|
1090
1090
|
* features instead of hints over time.
|
1091
|
-
*
|
1091
|
+
*
|
1092
1092
|
* hint(ENABLE_OPENGL_4X_SMOOTH) - Enable 4x anti-aliasing for P3D. This
|
1093
1093
|
* can help force anti-aliasing if it has not been enabled by the user. On
|
1094
1094
|
* some graphics cards, this can also be set by the graphics driver's
|
@@ -1096,13 +1096,13 @@ public class PGraphics extends PImage implements PConstants {
|
|
1096
1096
|
* be called immediately after the size() command because it resets the
|
1097
1097
|
* renderer, obliterating any settings and anything drawn (and like size(),
|
1098
1098
|
* re-running the code that came before it again).
|
1099
|
-
*
|
1099
|
+
*
|
1100
1100
|
* hint(DISABLE_OPENGL_2X_SMOOTH) - In Processing 1.0, Processing always
|
1101
1101
|
* enables 2x smoothing when the P3D renderer is used. This hint disables
|
1102
1102
|
* the default 2x smoothing and returns the smoothing behavior found in
|
1103
1103
|
* earlier releases, where smooth() and noSmooth() could be used to enable
|
1104
1104
|
* and disable smoothing, though the quality was inferior.
|
1105
|
-
*
|
1105
|
+
*
|
1106
1106
|
* hint(ENABLE_NATIVE_FONTS) - Use the native version fonts when they are
|
1107
1107
|
* installed, rather than the bitmapped version from a .vlw file. This is
|
1108
1108
|
* useful with the default (or JAVA2D) renderer setting, as it will improve
|
@@ -1111,7 +1111,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
1111
1111
|
* machine (because you have the font installed) but lousy on others'
|
1112
1112
|
* machines if the identical font is unavailable. This option can only be
|
1113
1113
|
* set per-sketch, and must be called before any use of textFont().
|
1114
|
-
*
|
1114
|
+
*
|
1115
1115
|
* hint(DISABLE_DEPTH_TEST) - Disable the zbuffer, allowing you to draw on
|
1116
1116
|
* top of everything at will. When depth testing is disabled, items will be
|
1117
1117
|
* drawn to the screen sequentially, like a painting. This hint is most
|
@@ -1121,14 +1121,14 @@ public class PGraphics extends PImage implements PConstants {
|
|
1121
1121
|
* hint(ENABLE_DEPTH_TEST), but note that with the depth buffer cleared,
|
1122
1122
|
* any 3D drawing that happens later in draw() will ignore existing shapes
|
1123
1123
|
* on the screen.
|
1124
|
-
*
|
1124
|
+
*
|
1125
1125
|
* hint(ENABLE_DEPTH_SORT) - Enable primitive z-sorting of triangles and
|
1126
1126
|
* lines in P3D and OPENGL. This can slow performance considerably, and the
|
1127
1127
|
* algorithm is not yet perfect. Restore the default with hint(DISABLE_DEPTH_SORT).
|
1128
|
-
*
|
1128
|
+
*
|
1129
1129
|
* hint(DISABLE_OPENGL_ERROR_REPORT) - Speeds up the P3D renderer setting
|
1130
1130
|
* by not checking for errors while running. Undo with hint(ENABLE_OPENGL_ERROR_REPORT).
|
1131
|
-
*
|
1131
|
+
*
|
1132
1132
|
* hint(ENABLE_BUFFER_READING) - Depth and stencil buffers in P2D/P3D will be
|
1133
1133
|
* downsampled to make PGL#readPixels work with multisampling. Enabling this
|
1134
1134
|
* introduces some overhead, so if you experience bad performance, disable
|
@@ -1137,17 +1137,17 @@ public class PGraphics extends PImage implements PConstants {
|
|
1137
1137
|
* creating your PGraphics2D/3D. You can restore the default with
|
1138
1138
|
* hint(DISABLE_BUFFER_READING) if you don't plan to read depth from
|
1139
1139
|
* this PGraphics anymore.
|
1140
|
-
*
|
1140
|
+
*
|
1141
1141
|
* hint(ENABLE_KEY_REPEAT) - Auto-repeating key events are discarded
|
1142
1142
|
* by default (works only in P2D/P3D); use this hint to get all the key events
|
1143
1143
|
* (including auto-repeated). Call hint(DISABLE_KEY_REPEAT) to get events
|
1144
1144
|
* only when the key goes physically up or down.
|
1145
|
-
*
|
1145
|
+
*
|
1146
1146
|
* hint(DISABLE_ASYNC_SAVEFRAME) - P2D/P3D only - save() and saveFrame()
|
1147
1147
|
* will not use separate threads for saving and will block until the image
|
1148
1148
|
* is written to the drive. This was the default behavior in 3.0b7 and before.
|
1149
1149
|
* To enable, call hint(ENABLE_ASYNC_SAVEFRAME).
|
1150
|
-
*
|
1150
|
+
*
|
1151
1151
|
* As of release 0149, unhint() has been removed in favor of adding
|
1152
1152
|
* additional ENABLE/DISABLE constants to reset the default behavior. This
|
1153
1153
|
* prevents the double negatives, and also reinforces which hints can be
|
@@ -1209,12 +1209,12 @@ public class PGraphics extends PImage implements PConstants {
|
|
1209
1209
|
* specifies a position in 2D and the <b>vertex()</b> function with three
|
1210
1210
|
* parameters specifies a position in 3D. Each shape will be outlined with
|
1211
1211
|
* the current stroke color and filled with the fill color.
|
1212
|
-
*
|
1212
|
+
*
|
1213
1213
|
* Transformations such as <b>translate()</b>, <b>rotate()</b>, and
|
1214
1214
|
* <b>scale()</b> do not work within <b>beginShape()</b>. It is also not
|
1215
1215
|
* possible to use other shapes, such as <b>ellipse()</b> or <b>rect()</b>
|
1216
1216
|
* within <b>beginShape()</b>.
|
1217
|
-
*
|
1217
|
+
*
|
1218
1218
|
* The P3D renderer settings allow <b>stroke()</b> and <b>fill()</b>
|
1219
1219
|
* settings to be altered per-vertex, however the default P2D renderer does
|
1220
1220
|
* not. Settings such as <b>strokeWeight()</b>, <b>strokeCap()</b>, and
|
@@ -1359,7 +1359,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
1359
1359
|
* Sets a texture to be applied to vertex points. The <b>texture()</b>
|
1360
1360
|
* function must be called between <b>beginShape()</b> and
|
1361
1361
|
* <b>endShape()</b> and before any calls to <b>vertex()</b>.
|
1362
|
-
*
|
1362
|
+
*
|
1363
1363
|
* When textures are in use, the fill color is ignored. Instead, use tint()
|
1364
1364
|
* to specify the color of the texture as it is applied to the shape.
|
1365
1365
|
*
|
@@ -1606,11 +1606,11 @@ public class PGraphics extends PImage implements PConstants {
|
|
1606
1606
|
* All shapes are constructed by connecting a series of vertices.
|
1607
1607
|
* <b>vertex()</b> is used to specify the vertex coordinates for points,
|
1608
1608
|
* lines, triangles, quads, and polygons and is used exclusively within the
|
1609
|
-
* <b>beginShape()</b> and <b>endShape()</b> function
|
1610
|
-
*
|
1609
|
+
* <b>beginShape()</b> and <b>endShape()</b> function.
|
1610
|
+
*
|
1611
1611
|
* Drawing a vertex in 3D using the <b>z</b> parameter requires the P3D
|
1612
|
-
* parameter in combination with size as shown in the above example
|
1613
|
-
*
|
1612
|
+
* parameter in combination with size as shown in the above example.
|
1613
|
+
*
|
1614
1614
|
* This function is also used to map a texture onto the geometry. The
|
1615
1615
|
* <b>texture()</b> function declares the texture to apply to the geometry
|
1616
1616
|
* and the <b>u</b> and <b>v</b> coordinates set define the mapping of this
|
@@ -3748,8 +3748,8 @@ public class PGraphics extends PImage implements PConstants {
|
|
3748
3748
|
* <b>image()</b> to set the location of one corner of the image and uses
|
3749
3749
|
* the fourth and fifth parameters to set the opposite corner. Use
|
3750
3750
|
* <b>imageMode(CENTER)</b> to draw images centered at the given x and y
|
3751
|
-
* position
|
3752
|
-
*
|
3751
|
+
* position.
|
3752
|
+
*
|
3753
3753
|
* The parameter to <b>imageMode()</b> must be written in ALL CAPS because
|
3754
3754
|
* Processing is a case-sensitive language.
|
3755
3755
|
*
|
@@ -3783,13 +3783,13 @@ public class PGraphics extends PImage implements PConstants {
|
|
3783
3783
|
* <b>x</b> and <b>y</b> parameters define the location of the image from
|
3784
3784
|
* its upper-left corner. The image is displayed at its original size
|
3785
3785
|
* unless the <b>width</b> and <b>height</b> parameters specify a different
|
3786
|
-
* size
|
3787
|
-
*
|
3786
|
+
* size.
|
3787
|
+
*
|
3788
3788
|
* The <b>imageMode()</b> function changes the way the parameters work. For
|
3789
3789
|
* example, a call to <b>imageMode(CORNERS)</b> will change the
|
3790
3790
|
* <b>width</b> and <b>height</b> parameters to define the x and y values
|
3791
|
-
* of the opposite corner of the image
|
3792
|
-
*
|
3791
|
+
* of the opposite corner of the image.
|
3792
|
+
*
|
3793
3793
|
* The color of an image may be modified with the <b>tint()</b> function.
|
3794
3794
|
* This function will maintain transparency for GIF and PNG images.
|
3795
3795
|
*
|
@@ -4018,7 +4018,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
4018
4018
|
* to <b>shapeMode(CORNERS)</b>, for example, will change the width and
|
4019
4019
|
* height parameters to define the x and y values of the opposite corner of
|
4020
4020
|
* the shape.
|
4021
|
-
*
|
4021
|
+
*
|
4022
4022
|
* Note complex shapes may draw awkwardly with P3D. This renderer does not
|
4023
4023
|
* yet support shapes that have holes or complicated breaks.
|
4024
4024
|
*
|
@@ -4167,7 +4167,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
4167
4167
|
* CENTER, and RIGHT set the display characteristics of the letters in
|
4168
4168
|
* relation to the values for the <b>x</b> and <b>y</b> parameters of the
|
4169
4169
|
* <b>text()</b> function.
|
4170
|
-
*
|
4170
|
+
*
|
4171
4171
|
* In Processing 0125 and later, an optional second parameter can be used
|
4172
4172
|
* to vertically align the text. BASELINE is the default, and the vertical
|
4173
4173
|
* alignment will be reset to BASELINE if the second parameter is not used.
|
@@ -4175,12 +4175,12 @@ public class PGraphics extends PImage implements PConstants {
|
|
4175
4175
|
* offsets the line based on the current <b>textDescent()</b>. For multiple
|
4176
4176
|
* lines, the final line will be aligned to the bottom, with the previous
|
4177
4177
|
* lines appearing above it.
|
4178
|
-
*
|
4178
|
+
*
|
4179
4179
|
* When using <b>text()</b> with width and height parameters, BASELINE is
|
4180
4180
|
* ignored, and treated as TOP. (Otherwise, text would by default draw
|
4181
4181
|
* outside the box, since BASELINE is the default setting. BASELINE is not
|
4182
4182
|
* a useful drawing mode for text drawn in a rectangle.)
|
4183
|
-
*
|
4183
|
+
*
|
4184
4184
|
* The vertical alignment is based on the value of <b>textAscent()</b>,
|
4185
4185
|
* which many fonts do not specify correctly. It may be necessary to use a
|
4186
4186
|
* hack and offset by a few pixels by hand so that the offset looks
|
@@ -4257,10 +4257,10 @@ public class PGraphics extends PImage implements PConstants {
|
|
4257
4257
|
* <b>text()</b> function. If no <b>size</b> parameter is input, the font
|
4258
4258
|
* will appear at its original size (the size it was created at with the
|
4259
4259
|
* "Create Font..." tool) until it is changed with <b>textSize()</b>. <br
|
4260
|
-
* />
|
4260
|
+
* /> Because fonts are usually bitmaped, you should create fonts at
|
4261
4261
|
* the sizes that will be used most commonly. Using <b>textFont()</b>
|
4262
4262
|
* without the size parameter will result in the cleanest-looking text. <br
|
4263
|
-
*
|
4263
|
+
* /> With the default (JAVA2D) and PDF renderers, it's also possible
|
4264
4264
|
* to enable the use of native fonts via the command
|
4265
4265
|
* <b>hint(ENABLE_NATIVE_FONTS)</b>. This will produce vector text in
|
4266
4266
|
* JAVA2D sketches and PDF output in cases where the vector data is
|
@@ -4374,16 +4374,16 @@ public class PGraphics extends PImage implements PConstants {
|
|
4374
4374
|
*
|
4375
4375
|
* Sets the way text draws to the screen. In the default configuration, the
|
4376
4376
|
* <b>MODEL</b> mode, it's possible to rotate, scale, and place letters in
|
4377
|
-
* two and three dimensional space
|
4378
|
-
*
|
4377
|
+
* two and three dimensional space.
|
4378
|
+
*
|
4379
4379
|
* The <b>SHAPE</b> mode draws text using the the glyph outlines of
|
4380
4380
|
* individual characters rather than as textures. This mode is only
|
4381
4381
|
* supported with the <b>PDF</b> and <b>P3D</b> renderer settings. With the
|
4382
4382
|
* <b>PDF</b> renderer, you must call <b>textMode(SHAPE)</b> before any
|
4383
4383
|
* other drawing occurs. If the outlines are not available, then
|
4384
4384
|
* <b>textMode(SHAPE)</b> will be ignored and <b>textMode(MODEL)</b> will
|
4385
|
-
* be used instead
|
4386
|
-
*
|
4385
|
+
* be used instead.
|
4386
|
+
*
|
4387
4387
|
* The <b>textMode(SHAPE)</b> option in <b>P3D</b> can be combined with
|
4388
4388
|
* <b>beginRaw()</b> to write vector-accurate text to 2D and 3D output
|
4389
4389
|
* files, for instance <b>DXF</b> or <b>PDF</b>. The <b>SHAPE</b> mode is
|
@@ -4577,7 +4577,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
4577
4577
|
* with the <b>fill()</b> function. The text displays in relation to the
|
4578
4578
|
* <b>textAlign()</b> function, which gives the option to draw to the left,
|
4579
4579
|
* right, and center of the coordinates.
|
4580
|
-
*
|
4580
|
+
*
|
4581
4581
|
* The <b>x2</b> and <b>y2</b> parameters define a rectangular area to
|
4582
4582
|
* display within and may only be used with string data. For text drawn
|
4583
4583
|
* inside a rectangle, the coordinates are interpreted based on the current
|
@@ -4747,11 +4747,11 @@ public class PGraphics extends PImage implements PConstants {
|
|
4747
4747
|
* Draw text in a box that is constrained to a particular size.
|
4748
4748
|
* The current rectMode() determines what the coordinates mean
|
4749
4749
|
* (whether x1/y1/x2/y2 or x/y/w/h).
|
4750
|
-
*
|
4750
|
+
*
|
4751
4751
|
* Note that the x,y coords of the start of the box
|
4752
4752
|
* will align with the *ascent* of the text, not the baseline,
|
4753
4753
|
* as is the case for the other text() functions.
|
4754
|
-
*
|
4754
|
+
*
|
4755
4755
|
* Newlines that are \n (Unix newline or linefeed char, ascii 10)
|
4756
4756
|
* are honored, and \r (carriage return, Windows and Mac OS) are
|
4757
4757
|
* ignored.
|
@@ -5175,8 +5175,8 @@ public class PGraphics extends PImage implements PConstants {
|
|
5175
5175
|
* They allow you to change the style and transformation settings
|
5176
5176
|
* and later return to what you had. When a new state is started
|
5177
5177
|
* with push(), it builds on the current style and transform
|
5178
|
-
* information
|
5179
|
-
*
|
5178
|
+
* information.
|
5179
|
+
*
|
5180
5180
|
* <b>push()</b> stores information related to the current
|
5181
5181
|
* transformation state and style settings controlled by the
|
5182
5182
|
* following functions: <b>rotate()</b>, <b>translate()</b>,
|
@@ -5184,8 +5184,8 @@ public class PGraphics extends PImage implements PConstants {
|
|
5184
5184
|
* <b>strokeWeight()</b>, <b>strokeCap()</b>, <b>strokeJoin()</b>,
|
5185
5185
|
* <b>imageMode()</b>, <b>rectMode()</b>, <b>ellipseMode()</b>,
|
5186
5186
|
* <b>colorMode()</b>, <b>textAlign()</b>, <b>textFont()</b>,
|
5187
|
-
* <b>textMode()</b>, <b>textSize()</b>, <b>textLeading()</b
|
5188
|
-
*
|
5187
|
+
* <b>textMode()</b>, <b>textSize()</b>, <b>textLeading()</b>.
|
5188
|
+
*
|
5189
5189
|
* The <b>push()</b> and <b>pop()</b> functions were added with
|
5190
5190
|
* Processing 3.5. They can be used in place of <b>pushMatrix()</b>,
|
5191
5191
|
* <b>popMatrix()</b>, <b>pushStyles()</b>, and <b>popStyles()</b>.
|
@@ -5211,9 +5211,9 @@ public class PGraphics extends PImage implements PConstants {
|
|
5211
5211
|
* Note that these functions are always used together. They allow
|
5212
5212
|
* you to change the style and transformation settings and later
|
5213
5213
|
* return to what you had. When a new state is started with push(),
|
5214
|
-
* it builds on the current style and transform information
|
5215
|
-
*
|
5216
|
-
*
|
5214
|
+
* it builds on the current style and transform information.
|
5215
|
+
*
|
5216
|
+
*
|
5217
5217
|
* <b>push()</b> stores information related to the current
|
5218
5218
|
* transformation state and style settings controlled by the
|
5219
5219
|
* following functions: <b>rotate()</b>, <b>translate()</b>,
|
@@ -5221,8 +5221,8 @@ public class PGraphics extends PImage implements PConstants {
|
|
5221
5221
|
* <b>strokeWeight()</b>, <b>strokeCap()</b>, <b>strokeJoin()</b>,
|
5222
5222
|
* <b>imageMode()</b>, <b>rectMode()</b>, <b>ellipseMode()</b>,
|
5223
5223
|
* <b>colorMode()</b>, <b>textAlign()</b>, <b>textFont()</b>,
|
5224
|
-
* <b>textMode()</b>, <b>textSize()</b>, <b>textLeading()</b
|
5225
|
-
*
|
5224
|
+
* <b>textMode()</b>, <b>textSize()</b>, <b>textLeading()</b>.
|
5225
|
+
*
|
5226
5226
|
* The <b>push()</b> and <b>pop()</b> functions were added with
|
5227
5227
|
* Processing 3.5. They can be used in place of <b>pushMatrix()</b>,
|
5228
5228
|
* <b>popMatrix()</b>, <b>pushStyles()</b>, and <b>popStyles()</b>.
|
@@ -5350,7 +5350,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
5350
5350
|
* Rotates a shape the amount specified by the <b>angle</b> parameter.
|
5351
5351
|
* Angles should be specified in radians (values from 0 to TWO_PI) or
|
5352
5352
|
* converted to radians with the <b>radians()</b> function.
|
5353
|
-
*
|
5353
|
+
*
|
5354
5354
|
* Objects are always rotated around their relative position to the origin
|
5355
5355
|
* and positive numbers rotate objects in a clockwise direction.
|
5356
5356
|
* Transformations apply to everything that happens after and subsequent
|
@@ -5358,7 +5358,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
5358
5358
|
* <b>rotate(HALF_PI)</b> and then <b>rotate(HALF_PI)</b> is the same as
|
5359
5359
|
* <b>rotate(PI)</b>. All tranformations are reset when <b>draw()</b>
|
5360
5360
|
* begins again.
|
5361
|
-
*
|
5361
|
+
*
|
5362
5362
|
* Technically, <b>rotate()</b> multiplies the current transformation
|
5363
5363
|
* matrix by a rotation matrix. This function can be further controlled by
|
5364
5364
|
* the <b>pushMatrix()</b> and <b>popMatrix()</b>.
|
@@ -5561,7 +5561,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
5561
5561
|
* <b>shearX(PI/2)</b> and then <b>shearX(PI/2)</b> is the same as
|
5562
5562
|
* <b>shearX(PI)</b>. If <b>shearX()</b> is called within the
|
5563
5563
|
* <b>draw()</b>, the transformation is reset when the loop begins again.
|
5564
|
-
*
|
5564
|
+
*
|
5565
5565
|
* Technically, <b>shearX()</b> multiplies the current transformation
|
5566
5566
|
* matrix by a rotation matrix. This function can be further controlled by
|
5567
5567
|
* the <b>pushMatrix()</b> and <b>popMatrix()</b> functions.
|
@@ -5595,7 +5595,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
5595
5595
|
* <b>shearY(PI/2)</b> and then <b>shearY(PI/2)</b> is the same as
|
5596
5596
|
* <b>shearY(PI)</b>. If <b>shearY()</b> is called within the
|
5597
5597
|
* <b>draw()</b>, the transformation is reset when the loop begins again.
|
5598
|
-
*
|
5598
|
+
*
|
5599
5599
|
* Technically, <b>shearY()</b> multiplies the current transformation
|
5600
5600
|
* matrix by a rotation matrix. This function can be further controlled by
|
5601
5601
|
* the <b>pushMatrix()</b> and <b>popMatrix()</b> functions.
|
@@ -5801,14 +5801,14 @@ public class PGraphics extends PImage implements PConstants {
|
|
5801
5801
|
* The <b>beginCamera()</b> and <b>endCamera()</b> functions enable
|
5802
5802
|
* advanced customization of the camera space. The functions are useful if
|
5803
5803
|
* you want to more control over camera movement, however for most users,
|
5804
|
-
* the <b>camera()</b> function will be sufficient
|
5804
|
+
* the <b>camera()</b> function will be sufficient.The camera
|
5805
5805
|
* functions will replace any transformations (such as <b>rotate()</b> or
|
5806
5806
|
* <b>translate()</b>) that occur before them in <b>draw()</b>, but they
|
5807
5807
|
* will not automatically replace the camera transform itself. For this
|
5808
5808
|
* reason, camera functions should be placed at the beginning of
|
5809
5809
|
* <b>draw()</b> (so that transformations happen afterwards), and the
|
5810
5810
|
* <b>camera()</b> function can be used after <b>beginCamera()</b> if you
|
5811
|
-
* want to reset the camera before applying transformations.<br
|
5811
|
+
* want to reset the camera before applying transformations.<br
|
5812
5812
|
* />This function sets the matrix mode to the camera matrix so calls such
|
5813
5813
|
* as <b>translate()</b>, <b>rotate()</b>, applyMatrix() and resetMatrix()
|
5814
5814
|
* affect the camera. <b>beginCamera()</b> should always be used with a
|
@@ -6117,7 +6117,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
6117
6117
|
* transformations (scale, rotate, translate, etc.) The X value can be used
|
6118
6118
|
* to place an object in space relative to the location of the original
|
6119
6119
|
* point once the transformations are no longer in use.
|
6120
|
-
*
|
6120
|
+
*
|
6121
6121
|
* In the example, the <b>modelX()</b>, <b>modelY()</b>, and
|
6122
6122
|
* <b>modelZ()</b> functions record the location of a box in space after
|
6123
6123
|
* being placed using a series of translate and rotate commands. After
|
@@ -6147,8 +6147,8 @@ public class PGraphics extends PImage implements PConstants {
|
|
6147
6147
|
* returns the Y value for a given coordinate based on the current set of
|
6148
6148
|
* transformations (scale, rotate, translate, etc.) The Y value can be used
|
6149
6149
|
* to place an object in space relative to the location of the original
|
6150
|
-
* point once the transformations are no longer in use
|
6151
|
-
*
|
6150
|
+
* point once the transformations are no longer in use.
|
6151
|
+
*
|
6152
6152
|
* In the example, the <b>modelX()</b>, <b>modelY()</b>, and
|
6153
6153
|
* <b>modelZ()</b> functions record the location of a box in space after
|
6154
6154
|
* being placed using a series of translate and rotate commands. After
|
@@ -6178,8 +6178,8 @@ public class PGraphics extends PImage implements PConstants {
|
|
6178
6178
|
* returns the Z value for a given coordinate based on the current set of
|
6179
6179
|
* transformations (scale, rotate, translate, etc.) The Z value can be used
|
6180
6180
|
* to place an object in space relative to the location of the original
|
6181
|
-
* point once the transformations are no longer in use
|
6182
|
-
*
|
6181
|
+
* point once the transformations are no longer in use.
|
6182
|
+
*
|
6183
6183
|
* In the example, the <b>modelX()</b>, <b>modelY()</b>, and
|
6184
6184
|
* <b>modelZ()</b> functions record the location of a box in space after
|
6185
6185
|
* being placed using a series of translate and rotate commands. After
|
@@ -6217,7 +6217,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
6217
6217
|
* <b>pushStyle()</b>, it builds on the current style information. The
|
6218
6218
|
* <b>pushStyle()</b> and <b>popStyle()</b> functions can be embedded to
|
6219
6219
|
* provide more control (see the second example above for a demonstration.)
|
6220
|
-
*
|
6220
|
+
*
|
6221
6221
|
* The style information controlled by the following functions are included
|
6222
6222
|
* in the style:
|
6223
6223
|
* fill(), stroke(), tint(), strokeWeight(), strokeCap(), strokeJoin(),
|
@@ -6410,7 +6410,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
6410
6410
|
*
|
6411
6411
|
* Sets the width of the stroke used for lines, points, and the border
|
6412
6412
|
* around shapes. All widths are set in units of pixels.
|
6413
|
-
*
|
6413
|
+
*
|
6414
6414
|
* When drawing with P3D, series of connected lines (such as the stroke
|
6415
6415
|
* around a polygon, triangle, or ellipse) produce unattractive results
|
6416
6416
|
* when a thick stroke weight is set (<a
|
@@ -6439,7 +6439,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
6439
6439
|
* are either mitered, beveled, or rounded and specified with the
|
6440
6440
|
* corresponding parameters MITER, BEVEL, and ROUND. The default joint is
|
6441
6441
|
* MITER.
|
6442
|
-
*
|
6442
|
+
*
|
6443
6443
|
* This function is not available with the P3D renderer, (<a
|
6444
6444
|
* href="http://code.google.com/p/processing/issues/detail?id=123">see
|
6445
6445
|
* Issue 123</a>). More information about the renderers can be found in the
|
@@ -6463,7 +6463,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
6463
6463
|
* Sets the style for rendering line endings. These ends are either
|
6464
6464
|
* squared, extended, or rounded and specified with the corresponding
|
6465
6465
|
* parameters SQUARE, PROJECT, and ROUND. The default cap is ROUND.
|
6466
|
-
*
|
6466
|
+
*
|
6467
6467
|
* This function is not available with the P3D renderer (<a
|
6468
6468
|
* href="http://code.google.com/p/processing/issues/detail?id=123">see
|
6469
6469
|
* Issue 123</a>). More information about the renderers can be found in the
|
@@ -6514,7 +6514,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
6514
6514
|
* is either specified in terms of the RGB or HSB color depending on the
|
6515
6515
|
* current <b>colorMode()</b> (the default color space is RGB, with each
|
6516
6516
|
* value in the range from 0 to 255).
|
6517
|
-
*
|
6517
|
+
*
|
6518
6518
|
* When using hexadecimal notation to specify a color, use "#" or "0x"
|
6519
6519
|
* before the values (e.g. #CCFFAA, 0xFFCCFFAA). The # syntax uses six
|
6520
6520
|
* digits to specify a color (the way colors are specified in HTML and
|
@@ -6522,7 +6522,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
6522
6522
|
* hexadecimal value must be specified with eight characters; the first two
|
6523
6523
|
* characters define the alpha component and the remainder the red, green,
|
6524
6524
|
* and blue components.
|
6525
|
-
*
|
6525
|
+
*
|
6526
6526
|
* The value for the parameter "gray" must be less than or equal to the
|
6527
6527
|
* current maximum value as specified by <b>colorMode()</b>. The default
|
6528
6528
|
* maximum value is 255.
|
@@ -6631,25 +6631,25 @@ public class PGraphics extends PImage implements PConstants {
|
|
6631
6631
|
* ( begin auto-generated from tint.xml )
|
6632
6632
|
*
|
6633
6633
|
* Sets the fill value for displaying images. Images can be tinted to
|
6634
|
-
* specified colors or made transparent by setting the alpha
|
6635
|
-
*
|
6634
|
+
* specified colors or made transparent by setting the alpha.
|
6635
|
+
*
|
6636
6636
|
* To make an image transparent, but not change it's color, use white as
|
6637
6637
|
* the tint color and specify an alpha value. For instance, tint(255, 128)
|
6638
6638
|
* will make an image 50% transparent (unless <b>colorMode()</b> has been
|
6639
|
-
* used)
|
6640
|
-
*
|
6639
|
+
* used).
|
6640
|
+
*
|
6641
6641
|
* When using hexadecimal notation to specify a color, use "#" or "0x"
|
6642
6642
|
* before the values (e.g. #CCFFAA, 0xFFCCFFAA). The # syntax uses six
|
6643
6643
|
* digits to specify a color (the way colors are specified in HTML and
|
6644
6644
|
* CSS). When using the hexadecimal notation starting with "0x", the
|
6645
6645
|
* hexadecimal value must be specified with eight characters; the first two
|
6646
6646
|
* characters define the alpha component and the remainder the red, green,
|
6647
|
-
* and blue components
|
6648
|
-
*
|
6647
|
+
* and blue components.
|
6648
|
+
*
|
6649
6649
|
* The value for the parameter "gray" must be less than or equal to the
|
6650
6650
|
* current maximum value as specified by <b>colorMode()</b>. The default
|
6651
|
-
* maximum value is 255
|
6652
|
-
*
|
6651
|
+
* maximum value is 255.
|
6652
|
+
*
|
6653
6653
|
* The <b>tint()</b> function is also used to control the coloring of
|
6654
6654
|
* textures in 3D.
|
6655
6655
|
*
|
@@ -6755,7 +6755,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
6755
6755
|
* color is either specified in terms of the RGB or HSB color depending on
|
6756
6756
|
* the current <b>colorMode()</b> (the default color space is RGB, with
|
6757
6757
|
* each value in the range from 0 to 255).
|
6758
|
-
*
|
6758
|
+
*
|
6759
6759
|
* When using hexadecimal notation to specify a color, use "#" or "0x"
|
6760
6760
|
* before the values (e.g. #CCFFAA, 0xFFCCFFAA). The # syntax uses six
|
6761
6761
|
* digits to specify a color (the way colors are specified in HTML and
|
@@ -6763,11 +6763,11 @@ public class PGraphics extends PImage implements PConstants {
|
|
6763
6763
|
* hexadecimal value must be specified with eight characters; the first two
|
6764
6764
|
* characters define the alpha component and the remainder the red, green,
|
6765
6765
|
* and blue components.
|
6766
|
-
*
|
6766
|
+
*
|
6767
6767
|
* The value for the parameter "gray" must be less than or equal to the
|
6768
6768
|
* current maximum value as specified by <b>colorMode()</b>. The default
|
6769
6769
|
* maximum value is 255.
|
6770
|
-
*
|
6770
|
+
*
|
6771
6771
|
* To change the color of an image (or a texture), use tint().
|
6772
6772
|
*
|
6773
6773
|
* ( end auto-generated )
|
@@ -7245,9 +7245,9 @@ public class PGraphics extends PImage implements PConstants {
|
|
7245
7245
|
*
|
7246
7246
|
* Sets the falloff rates for point lights, spot lights, and ambient
|
7247
7247
|
* lights. The parameters are used to determine the falloff with the
|
7248
|
-
* following equation
|
7249
|
-
* vertex
|
7250
|
-
* QUADRATIC)
|
7248
|
+
* following equation:d = distance from light position to
|
7249
|
+
* vertex positionfalloff = 1 / (CONSTANT + d * LINEAR + (d*d) *
|
7250
|
+
* QUADRATIC)Like <b>fill()</b>, it affects only the elements
|
7251
7251
|
* which are created after it in the code. The default value if
|
7252
7252
|
* <b>LightFalloff(1.0, 0.0, 0.0)</b>. Thinking about an ambient light with
|
7253
7253
|
* a falloff can be tricky. It is used, for example, if you wanted a region
|
@@ -7315,13 +7315,13 @@ public class PGraphics extends PImage implements PConstants {
|
|
7315
7315
|
* of the Processing window. The default background is light gray. In the
|
7316
7316
|
* <b>draw()</b> function, the background color is used to clear the
|
7317
7317
|
* display window at the beginning of each frame.
|
7318
|
-
*
|
7318
|
+
*
|
7319
7319
|
* An image can also be used as the background for a sketch, however its
|
7320
7320
|
* width and height must be the same size as the sketch window. To resize
|
7321
7321
|
* an image 'b' to the size of the sketch window, use b.resize(width, height).
|
7322
|
-
*
|
7322
|
+
*
|
7323
7323
|
* Images used as background will ignore the current <b>tint()</b> setting.
|
7324
|
-
*
|
7324
|
+
*
|
7325
7325
|
* It is not possible to use transparency (alpha) in background colors with
|
7326
7326
|
* the main drawing surface, however they will work properly with <b>createGraphics()</b>.
|
7327
7327
|
*
|
@@ -7452,13 +7452,13 @@ public class PGraphics extends PImage implements PConstants {
|
|
7452
7452
|
/**
|
7453
7453
|
* Takes an RGB or ARGB image and sets it as the background.
|
7454
7454
|
* The width and height of the image must be the same size as the sketch.
|
7455
|
-
* Use image.resize(width, height) to make short work of such a task
|
7456
|
-
*
|
7455
|
+
* Use image.resize(width, height) to make short work of such a task.
|
7456
|
+
*
|
7457
7457
|
* Note that even if the image is set as RGB, the high 8 bits of each pixel
|
7458
7458
|
* should be set opaque (0xFF000000) because the image data will be copied
|
7459
7459
|
* directly to the screen, and non-opaque background images may have strange
|
7460
|
-
* behavior. Use image.filter(OPAQUE) to handle this easily
|
7461
|
-
*
|
7460
|
+
* behavior. Use image.filter(OPAQUE) to handle this easily.
|
7461
|
+
*
|
7462
7462
|
* When using 3D, this will also clear the zbuffer (if it exists).
|
7463
7463
|
*
|
7464
7464
|
* @param image PImage to set as background (must be same size as the sketch window)
|
@@ -7906,12 +7906,12 @@ public class PGraphics extends PImage implements PConstants {
|
|
7906
7906
|
*
|
7907
7907
|
* Extracts the red value from a color, scaled to match current
|
7908
7908
|
* <b>colorMode()</b>. This value is always returned as a float so be
|
7909
|
-
* careful not to assign it to an int value
|
7909
|
+
* careful not to assign it to an int value.The red() function
|
7910
7910
|
* is easy to use and undestand, but is slower than another technique. To
|
7911
7911
|
* achieve the same results when working in <b>colorMode(RGB, 255)</b>, but
|
7912
7912
|
* with greater speed, use the >> (right shift) operator with a bit
|
7913
7913
|
* mask. For example, the following two lines of code are equivalent:<br
|
7914
|
-
* /><pre>float r1 = red(myColor)
|
7914
|
+
* /><pre>float r1 = red(myColor);float r2 = myColor >> 16
|
7915
7915
|
* & 0xFF;</pre>
|
7916
7916
|
*
|
7917
7917
|
* ( end auto-generated )
|
@@ -7939,12 +7939,12 @@ public class PGraphics extends PImage implements PConstants {
|
|
7939
7939
|
*
|
7940
7940
|
* Extracts the green value from a color, scaled to match current
|
7941
7941
|
* <b>colorMode()</b>. This value is always returned as a float so be
|
7942
|
-
* careful not to assign it to an int value
|
7942
|
+
* careful not to assign it to an int value.The <b>green()</b>
|
7943
7943
|
* function is easy to use and undestand, but is slower than another
|
7944
7944
|
* technique. To achieve the same results when working in <b>colorMode(RGB,
|
7945
7945
|
* 255)</b>, but with greater speed, use the >> (right shift)
|
7946
7946
|
* operator with a bit mask. For example, the following two lines of code
|
7947
|
-
* are equivalent:<
|
7947
|
+
* are equivalent:<pre>float r1 = green(myColor);float r2 =
|
7948
7948
|
* myColor >> 8 & 0xFF;</pre>
|
7949
7949
|
*
|
7950
7950
|
* ( end auto-generated )
|
@@ -7972,12 +7972,12 @@ public class PGraphics extends PImage implements PConstants {
|
|
7972
7972
|
*
|
7973
7973
|
* Extracts the blue value from a color, scaled to match current
|
7974
7974
|
* <b>colorMode()</b>. This value is always returned as a float so be
|
7975
|
-
* careful not to assign it to an int value
|
7975
|
+
* careful not to assign it to an int value.The <b>blue()</b>
|
7976
7976
|
* function is easy to use and undestand, but is slower than another
|
7977
7977
|
* technique. To achieve the same results when working in <b>colorMode(RGB,
|
7978
7978
|
* 255)</b>, but with greater speed, use a bit mask to remove the other
|
7979
7979
|
* color components. For example, the following two lines of code are
|
7980
|
-
* equivalent:<
|
7980
|
+
* equivalent:<pre>float r1 = blue(myColor);float r2 = myColor
|
7981
7981
|
* & 0xFF;</pre>
|
7982
7982
|
*
|
7983
7983
|
* ( end auto-generated )
|
@@ -8351,7 +8351,7 @@ public class PGraphics extends PImage implements PConstants {
|
|
8351
8351
|
* Return true if this renderer should be drawn to the screen. Defaults to
|
8352
8352
|
* returning true, since nearly all renderers are on-screen beasts. But can
|
8353
8353
|
* be overridden for subclasses like PDF so that a window doesn't open up.
|
8354
|
-
*
|
8354
|
+
*
|
8355
8355
|
* A better name? showFrame, displayable, isVisible, visible, shouldDisplay,
|
8356
8356
|
* what to call this?
|
8357
8357
|
*/
|