propane 3.4.1-java → 3.7.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.mvn/extensions.xml +1 -1
- data/.mvn/wrapper/MavenWrapperDownloader.java +2 -2
- data/.mvn/wrapper/maven-wrapper.properties +2 -2
- data/.travis.yml +1 -1
- data/CHANGELOG.md +9 -1
- data/Gemfile +2 -0
- data/README.md +9 -5
- data/Rakefile +10 -11
- data/bin/propane +3 -1
- data/lib/propane.rb +4 -2
- data/lib/propane/app.rb +2 -1
- data/lib/propane/creators/sketch_class.rb +7 -1
- data/lib/propane/creators/sketch_factory.rb +4 -2
- data/lib/propane/creators/sketch_writer.rb +1 -0
- data/lib/propane/helper_methods.rb +22 -23
- data/lib/propane/helpers/numeric.rb +2 -0
- data/lib/propane/helpers/version_error.rb +1 -0
- data/lib/propane/library.rb +5 -1
- data/lib/propane/library_loader.rb +2 -0
- data/lib/propane/native_folder.rb +10 -9
- data/lib/propane/native_loader.rb +3 -0
- data/lib/propane/runner.rb +20 -14
- data/lib/propane/version.rb +2 -1
- data/library/boids/boids.rb +21 -11
- data/library/color_group/color_group.rb +2 -0
- data/library/control_panel/control_panel.rb +8 -5
- data/library/dxf/dxf.rb +2 -0
- data/library/file_chooser/chooser.rb +10 -9
- data/library/file_chooser/file_chooser.rb +10 -9
- data/library/library_proxy/library_proxy.rb +2 -0
- data/library/net/net.rb +2 -0
- data/library/simplex_noise/simplex_noise.rb +2 -0
- data/library/slider/slider.rb +23 -22
- data/library/vector_utils/vector_utils.rb +4 -0
- data/library/video_event/video_event.rb +2 -0
- data/pom.rb +37 -36
- data/pom.xml +6 -6
- data/propane.gemspec +12 -10
- data/src/main/java/japplemenubar/JAppleMenuBar.java +3 -3
- data/src/main/java/monkstone/ColorUtil.java +1 -3
- data/src/main/java/monkstone/MathToolModule.java +10 -9
- data/src/main/java/monkstone/PropaneLibrary.java +2 -2
- data/src/main/java/monkstone/fastmath/Deglut.java +1 -1
- data/src/main/java/monkstone/filechooser/Chooser.java +1 -1
- data/src/main/java/monkstone/noise/SimplexNoise.java +2 -2
- 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 +1 -1
- 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 -2
- 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 +781 -285
- data/src/main/java/processing/awt/PImageAWT.java +377 -0
- data/src/main/java/processing/awt/PShapeJava2D.java +56 -52
- data/src/main/java/processing/awt/PSurfaceAWT.java +308 -208
- data/src/main/java/processing/awt/ShimAWT.java +581 -0
- data/src/main/java/processing/core/PApplet.java +4225 -4855
- data/src/main/java/processing/core/PConstants.java +477 -447
- data/src/main/java/processing/core/PFont.java +914 -880
- data/src/main/java/processing/core/PGraphics.java +150 -134
- data/src/main/java/processing/core/PImage.java +275 -372
- data/src/main/java/processing/core/PMatrix.java +172 -159
- data/src/main/java/processing/core/PMatrix2D.java +478 -415
- data/src/main/java/processing/core/PMatrix3D.java +762 -735
- data/src/main/java/processing/core/PShape.java +2887 -2651
- data/src/main/java/processing/core/PShapeOBJ.java +97 -92
- data/src/main/java/processing/core/PShapeSVG.java +1705 -1490
- data/src/main/java/processing/core/PStyle.java +40 -37
- data/src/main/java/processing/core/PSurface.java +139 -97
- data/src/main/java/processing/core/PSurfaceNone.java +296 -218
- data/src/main/java/processing/core/PVector.java +995 -963
- data/src/main/java/processing/core/ThinkDifferent.java +12 -8
- data/src/main/java/processing/data/DoubleDict.java +756 -710
- data/src/main/java/processing/data/DoubleList.java +749 -696
- data/src/main/java/processing/data/FloatDict.java +748 -702
- data/src/main/java/processing/data/FloatList.java +751 -697
- data/src/main/java/processing/data/IntDict.java +720 -673
- data/src/main/java/processing/data/IntList.java +699 -633
- data/src/main/java/processing/data/JSONArray.java +931 -873
- data/src/main/java/processing/data/JSONObject.java +1262 -1165
- data/src/main/java/processing/data/JSONTokener.java +351 -341
- data/src/main/java/processing/data/LongDict.java +710 -663
- data/src/main/java/processing/data/LongList.java +701 -635
- data/src/main/java/processing/data/Sort.java +37 -41
- data/src/main/java/processing/data/StringDict.java +525 -486
- data/src/main/java/processing/data/StringList.java +626 -580
- data/src/main/java/processing/data/Table.java +3690 -3510
- data/src/main/java/processing/data/TableRow.java +182 -183
- data/src/main/java/processing/data/XML.java +957 -883
- data/src/main/java/processing/event/Event.java +87 -67
- data/src/main/java/processing/event/KeyEvent.java +48 -41
- data/src/main/java/processing/event/MouseEvent.java +88 -113
- data/src/main/java/processing/event/TouchEvent.java +10 -6
- data/src/main/java/processing/javafx/PGraphicsFX2D.java +20 -345
- data/src/main/java/processing/javafx/PSurfaceFX.java +149 -121
- data/src/main/java/processing/net/Client.java +20 -20
- data/src/main/java/processing/net/Server.java +9 -9
- data/src/main/java/processing/opengl/FontTexture.java +286 -266
- data/src/main/java/processing/opengl/FrameBuffer.java +389 -377
- data/src/main/java/processing/opengl/LinePath.java +132 -89
- data/src/main/java/processing/opengl/LineStroker.java +588 -581
- data/src/main/java/processing/opengl/PGL.java +660 -567
- data/src/main/java/processing/opengl/PGraphics2D.java +408 -315
- data/src/main/java/processing/opengl/PGraphics3D.java +107 -72
- data/src/main/java/processing/opengl/PGraphicsOpenGL.java +12378 -12075
- data/src/main/java/processing/opengl/PJOGL.java +1753 -1670
- data/src/main/java/processing/opengl/PShader.java +369 -461
- data/src/main/java/processing/opengl/PShapeOpenGL.java +4678 -4580
- data/src/main/java/processing/opengl/PSurfaceJOGL.java +1114 -1027
- data/src/main/java/processing/opengl/Texture.java +1492 -1401
- data/src/main/java/processing/opengl/VertexBuffer.java +57 -55
- data/test/create_test.rb +21 -20
- data/test/deglut_spec_test.rb +4 -2
- data/test/helper_methods_test.rb +49 -20
- data/test/math_tool_test.rb +39 -32
- data/test/native_folder.rb +47 -0
- data/test/respond_to_test.rb +3 -2
- 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 +35 -22
- data/vendors/Rakefile +35 -40
- metadata +42 -22
- data/src/main/java/processing/opengl/shaders/LightVert-brcm.glsl +0 -154
- data/src/main/java/processing/opengl/shaders/LightVert-vc4.glsl +0 -154
- data/src/main/java/processing/opengl/shaders/TexLightVert-brcm.glsl +0 -160
- data/src/main/java/processing/opengl/shaders/TexLightVert-vc4.glsl +0 -160
@@ -1,3 +1,5 @@
|
|
1
|
+
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
2
|
+
|
1
3
|
/*
|
2
4
|
Part of the Processing project - http://processing.org
|
3
5
|
|
@@ -18,30 +20,33 @@
|
|
18
20
|
Public License along with this library; if not, write to the
|
19
21
|
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
20
22
|
Boston, MA 02111-1307 USA
|
21
|
-
|
23
|
+
*/
|
24
|
+
|
22
25
|
package processing.core;
|
23
26
|
|
24
27
|
import java.awt.Cursor;
|
25
28
|
import java.awt.event.KeyEvent;
|
26
29
|
|
30
|
+
|
27
31
|
/**
|
28
32
|
* Numbers shared throughout processing.core.
|
29
33
|
* <P>
|
30
|
-
* An attempt is made to keep the constants as short/non-verbose
|
31
|
-
* For instance, the constant is TIFF instead of
|
32
|
-
* as long as we can get away with it.
|
34
|
+
* An attempt is made to keep the constants as short/non-verbose
|
35
|
+
* as possible. For instance, the constant is TIFF instead of
|
36
|
+
* FILE_TYPE_TIFF. We'll do this as long as we can get away with it.
|
33
37
|
*
|
34
38
|
* @usage Web & Application
|
35
39
|
*/
|
36
40
|
public interface PConstants {
|
37
41
|
|
38
|
-
|
39
|
-
|
40
|
-
|
42
|
+
static public final int X = 0;
|
43
|
+
static public final int Y = 1;
|
44
|
+
static public final int Z = 2;
|
45
|
+
|
41
46
|
|
42
|
-
|
47
|
+
// renderers known to processing.core
|
43
48
|
|
44
|
-
|
49
|
+
/*
|
45
50
|
// List of renderers used inside PdePreprocessor
|
46
51
|
static final StringList rendererList = new StringList(new String[] {
|
47
52
|
"JAVA2D", "JAVA2D_2X",
|
@@ -50,452 +55,477 @@ public interface PConstants {
|
|
50
55
|
"LWJGL.P2D", "LWJGL.P3D", // hmm
|
51
56
|
"PDF" // no DXF because that's only for beginRaw()
|
52
57
|
});
|
53
|
-
|
54
|
-
|
58
|
+
*/
|
59
|
+
|
60
|
+
static final String JAVA2D = "processing.awt.PGraphicsJava2D";
|
55
61
|
|
56
|
-
|
57
|
-
|
62
|
+
static final String P2D = "processing.opengl.PGraphics2D";
|
63
|
+
static final String P3D = "processing.opengl.PGraphics3D";
|
58
64
|
|
59
|
-
|
60
|
-
|
61
|
-
|
65
|
+
// When will it be time to remove this?
|
66
|
+
@Deprecated
|
67
|
+
static final String OPENGL = P3D;
|
62
68
|
|
63
|
-
|
69
|
+
// Experimental, higher-performance Java 2D renderer (but no pixel ops)
|
64
70
|
// static final String E2D = PGraphicsDanger2D.class.getName();
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
71
|
+
|
72
|
+
// Experimental JavaFX renderer; even better 2D performance
|
73
|
+
static final String FX2D = "processing.javafx.PGraphicsFX2D";
|
74
|
+
|
75
|
+
static final String PDF = "processing.pdf.PGraphicsPDF";
|
76
|
+
static final String SVG = "processing.svg.PGraphicsSVG";
|
77
|
+
static final String DXF = "processing.dxf.RawDXF";
|
78
|
+
|
79
|
+
// platform IDs for PApplet.platform
|
80
|
+
|
81
|
+
static final int OTHER = 0;
|
82
|
+
static final int WINDOWS = 1;
|
83
|
+
static final int MACOS = 2;
|
84
|
+
static final int LINUX = 3;
|
85
|
+
|
86
|
+
/** @deprecated Marketers gonna market, use {@link #MACOS} */
|
87
|
+
@Deprecated
|
88
|
+
static final int MACOSX = 2;
|
89
|
+
|
90
|
+
static final String[] platformNames = {
|
91
|
+
"other", "windows", "macosx", "linux"
|
92
|
+
};
|
93
|
+
|
94
|
+
|
95
|
+
static final float EPSILON = 0.0001f;
|
96
|
+
|
97
|
+
|
98
|
+
// max/min values for numbers
|
99
|
+
|
100
|
+
/**
|
101
|
+
* Same as Float.MAX_VALUE, but included for parity with MIN_VALUE,
|
102
|
+
* and to avoid teaching static methods on the first day.
|
103
|
+
*/
|
104
|
+
static final float MAX_FLOAT = Float.MAX_VALUE;
|
105
|
+
/**
|
106
|
+
* Note that Float.MIN_VALUE is the smallest <EM>positive</EM> value
|
107
|
+
* for a floating point number, not actually the minimum (negative) value
|
108
|
+
* for a float. This constant equals 0xFF7FFFFF, the smallest (farthest
|
109
|
+
* negative) value a float can have before it hits NaN.
|
110
|
+
*/
|
111
|
+
static final float MIN_FLOAT = -Float.MAX_VALUE;
|
112
|
+
/** Largest possible (positive) integer value */
|
113
|
+
static final int MAX_INT = Integer.MAX_VALUE;
|
114
|
+
/** Smallest possible (negative) integer value */
|
115
|
+
static final int MIN_INT = Integer.MIN_VALUE;
|
116
|
+
|
117
|
+
// shapes
|
118
|
+
|
119
|
+
static public final int VERTEX = 0;
|
120
|
+
static public final int BEZIER_VERTEX = 1;
|
121
|
+
static public final int QUADRATIC_VERTEX = 2;
|
122
|
+
static public final int CURVE_VERTEX = 3;
|
123
|
+
static public final int BREAK = 4;
|
124
|
+
|
125
|
+
@Deprecated
|
126
|
+
static public final int QUAD_BEZIER_VERTEX = 2; // should not have been exposed
|
127
|
+
|
128
|
+
// useful goodness
|
129
|
+
|
130
|
+
/**
|
131
|
+
* ( begin auto-generated from PI.xml )
|
132
|
+
*
|
133
|
+
* PI is a mathematical constant with the value 3.14159265358979323846. It
|
134
|
+
* is the ratio of the circumference of a circle to its diameter. It is
|
135
|
+
* useful in combination with the trigonometric functions <b>sin()</b> and
|
136
|
+
* <b>cos()</b>.
|
137
|
+
*
|
138
|
+
* ( end auto-generated )
|
139
|
+
* @webref constants
|
140
|
+
* @see PConstants#TWO_PI
|
141
|
+
* @see PConstants#TAU
|
142
|
+
* @see PConstants#HALF_PI
|
143
|
+
* @see PConstants#QUARTER_PI
|
144
|
+
*
|
145
|
+
*/
|
146
|
+
static final float PI = (float) Math.PI;
|
147
|
+
/**
|
148
|
+
* ( begin auto-generated from HALF_PI.xml )
|
149
|
+
*
|
150
|
+
* HALF_PI is a mathematical constant with the value
|
151
|
+
* 1.57079632679489661923. It is half the ratio of the circumference of a
|
152
|
+
* circle to its diameter. It is useful in combination with the
|
153
|
+
* trigonometric functions <b>sin()</b> and <b>cos()</b>.
|
154
|
+
*
|
155
|
+
* ( end auto-generated )
|
156
|
+
* @webref constants
|
157
|
+
* @see PConstants#PI
|
158
|
+
* @see PConstants#TWO_PI
|
159
|
+
* @see PConstants#TAU
|
160
|
+
* @see PConstants#QUARTER_PI
|
161
|
+
*/
|
162
|
+
static final float HALF_PI = (float) (Math.PI / 2.0);
|
163
|
+
static final float THIRD_PI = (float) (Math.PI / 3.0);
|
164
|
+
/**
|
165
|
+
* ( begin auto-generated from QUARTER_PI.xml )
|
166
|
+
*
|
167
|
+
* QUARTER_PI is a mathematical constant with the value 0.7853982. It is
|
168
|
+
* one quarter the ratio of the circumference of a circle to its diameter.
|
169
|
+
* It is useful in combination with the trigonometric functions
|
170
|
+
* <b>sin()</b> and <b>cos()</b>.
|
171
|
+
*
|
172
|
+
* ( end auto-generated )
|
173
|
+
* @webref constants
|
174
|
+
* @see PConstants#PI
|
175
|
+
* @see PConstants#TWO_PI
|
176
|
+
* @see PConstants#TAU
|
177
|
+
* @see PConstants#HALF_PI
|
178
|
+
*/
|
179
|
+
static final float QUARTER_PI = (float) (Math.PI / 4.0);
|
180
|
+
/**
|
181
|
+
* ( begin auto-generated from TWO_PI.xml )
|
182
|
+
*
|
183
|
+
* TWO_PI is a mathematical constant with the value 6.28318530717958647693.
|
184
|
+
* It is twice the ratio of the circumference of a circle to its diameter.
|
185
|
+
* It is useful in combination with the trigonometric functions
|
186
|
+
* <b>sin()</b> and <b>cos()</b>.
|
187
|
+
*
|
188
|
+
* ( end auto-generated )
|
189
|
+
* @webref constants
|
190
|
+
* @see PConstants#PI
|
191
|
+
* @see PConstants#TAU
|
192
|
+
* @see PConstants#HALF_PI
|
193
|
+
* @see PConstants#QUARTER_PI
|
194
|
+
*/
|
195
|
+
static final float TWO_PI = (float) (2.0 * Math.PI);
|
196
|
+
/**
|
197
|
+
* ( begin auto-generated from TAU.xml )
|
198
|
+
*
|
199
|
+
* TAU is an alias for TWO_PI, a mathematical constant with the value
|
200
|
+
* 6.28318530717958647693. It is twice the ratio of the circumference
|
201
|
+
* of a circle to its diameter. It is useful in combination with the
|
202
|
+
* trigonometric functions <b>sin()</b> and <b>cos()</b>.
|
203
|
+
*
|
204
|
+
* ( end auto-generated )
|
205
|
+
* @webref constants
|
206
|
+
* @see PConstants#PI
|
207
|
+
* @see PConstants#TWO_PI
|
208
|
+
* @see PConstants#HALF_PI
|
209
|
+
* @see PConstants#QUARTER_PI
|
210
|
+
*/
|
211
|
+
static final float TAU = (float) (2.0 * Math.PI);
|
212
|
+
|
213
|
+
static final float DEG_TO_RAD = PI/180.0f;
|
214
|
+
static final float RAD_TO_DEG = 180.0f/PI;
|
215
|
+
|
216
|
+
|
217
|
+
// angle modes
|
218
|
+
|
219
|
+
//static final int RADIANS = 0;
|
220
|
+
//static final int DEGREES = 1;
|
221
|
+
|
222
|
+
|
223
|
+
// used by split, all the standard whitespace chars
|
224
|
+
// (also includes unicode nbsp, that little bostage)
|
225
|
+
|
226
|
+
static final String WHITESPACE = " \t\n\r\f\u00A0";
|
227
|
+
|
228
|
+
|
229
|
+
// for colors and/or images
|
230
|
+
|
231
|
+
static final int RGB = 1; // image & color
|
232
|
+
static final int ARGB = 2; // image
|
233
|
+
static final int HSB = 3; // color
|
234
|
+
static final int ALPHA = 4; // image
|
220
235
|
// static final int CMYK = 5; // image & color (someday)
|
221
236
|
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
237
|
+
|
238
|
+
// image file types
|
239
|
+
|
240
|
+
static final int TIFF = 0;
|
241
|
+
static final int TARGA = 1;
|
242
|
+
static final int JPEG = 2;
|
243
|
+
static final int GIF = 3;
|
244
|
+
|
245
|
+
|
246
|
+
// filter/convert types
|
247
|
+
|
248
|
+
static final int BLUR = 11;
|
249
|
+
static final int GRAY = 12;
|
250
|
+
static final int INVERT = 13;
|
251
|
+
static final int OPAQUE = 14;
|
252
|
+
static final int POSTERIZE = 15;
|
253
|
+
static final int THRESHOLD = 16;
|
254
|
+
static final int ERODE = 17;
|
255
|
+
static final int DILATE = 18;
|
256
|
+
|
257
|
+
|
258
|
+
// blend mode keyword definitions
|
259
|
+
// @see processing.core.PImage#blendColor(int,int,int)
|
260
|
+
|
261
|
+
public final static int REPLACE = 0;
|
262
|
+
public final static int BLEND = 1;
|
263
|
+
public final static int ADD = 1 << 1;
|
264
|
+
public final static int SUBTRACT = 1 << 2;
|
265
|
+
public final static int LIGHTEST = 1 << 3;
|
266
|
+
public final static int DARKEST = 1 << 4;
|
267
|
+
public final static int DIFFERENCE = 1 << 5;
|
268
|
+
public final static int EXCLUSION = 1 << 6;
|
269
|
+
public final static int MULTIPLY = 1 << 7;
|
270
|
+
public final static int SCREEN = 1 << 8;
|
271
|
+
public final static int OVERLAY = 1 << 9;
|
272
|
+
public final static int HARD_LIGHT = 1 << 10;
|
273
|
+
public final static int SOFT_LIGHT = 1 << 11;
|
274
|
+
public final static int DODGE = 1 << 12;
|
275
|
+
public final static int BURN = 1 << 13;
|
276
|
+
|
277
|
+
// for messages
|
278
|
+
|
279
|
+
static final int CHATTER = 0;
|
280
|
+
static final int COMPLAINT = 1;
|
281
|
+
static final int PROBLEM = 2;
|
282
|
+
|
283
|
+
|
284
|
+
// types of transformation matrices
|
285
|
+
|
286
|
+
static final int PROJECTION = 0;
|
287
|
+
static final int MODELVIEW = 1;
|
288
|
+
|
289
|
+
// types of projection matrices
|
290
|
+
|
291
|
+
static final int CUSTOM = 0; // user-specified fanciness
|
292
|
+
static final int ORTHOGRAPHIC = 2; // 2D isometric projection
|
293
|
+
static final int PERSPECTIVE = 3; // perspective matrix
|
294
|
+
|
295
|
+
|
296
|
+
// shapes
|
297
|
+
|
298
|
+
// the low four bits set the variety,
|
299
|
+
// higher bits set the specific shape type
|
300
|
+
|
301
|
+
static final int GROUP = 0; // createShape()
|
302
|
+
|
303
|
+
static final int POINT = 2; // primitive
|
304
|
+
static final int POINTS = 3; // vertices
|
305
|
+
|
306
|
+
static final int LINE = 4; // primitive
|
307
|
+
static final int LINES = 5; // beginShape(), createShape()
|
308
|
+
static final int LINE_STRIP = 50; // beginShape()
|
309
|
+
static final int LINE_LOOP = 51;
|
310
|
+
|
311
|
+
static final int TRIANGLE = 8; // primitive
|
312
|
+
static final int TRIANGLES = 9; // vertices
|
313
|
+
static final int TRIANGLE_STRIP = 10; // vertices
|
314
|
+
static final int TRIANGLE_FAN = 11; // vertices
|
315
|
+
|
316
|
+
static final int QUAD = 16; // primitive
|
317
|
+
static final int QUADS = 17; // vertices
|
318
|
+
static final int QUAD_STRIP = 18; // vertices
|
319
|
+
|
320
|
+
static final int POLYGON = 20; // in the end, probably cannot
|
321
|
+
static final int PATH = 21; // separate these two
|
322
|
+
|
323
|
+
static final int RECT = 30; // primitive
|
324
|
+
static final int ELLIPSE = 31; // primitive
|
325
|
+
static final int ARC = 32; // primitive
|
326
|
+
|
327
|
+
static final int SPHERE = 40; // primitive
|
328
|
+
static final int BOX = 41; // primitive
|
301
329
|
|
302
330
|
// static public final int POINT_SPRITES = 52;
|
303
331
|
// static public final int NON_STROKED_SHAPE = 60;
|
304
332
|
// static public final int STROKED_SHAPE = 61;
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
333
|
+
|
334
|
+
|
335
|
+
// shape closing modes
|
336
|
+
|
337
|
+
static final int OPEN = 1;
|
338
|
+
static final int CLOSE = 2;
|
339
|
+
|
340
|
+
|
341
|
+
// shape drawing modes
|
342
|
+
|
343
|
+
/** Draw mode convention to use (x, y) to (width, height) */
|
344
|
+
static final int CORNER = 0;
|
345
|
+
/** Draw mode convention to use (x1, y1) to (x2, y2) coordinates */
|
346
|
+
static final int CORNERS = 1;
|
347
|
+
/** Draw mode from the center, and using the radius */
|
348
|
+
static final int RADIUS = 2;
|
349
|
+
/**
|
350
|
+
* Draw from the center, using second pair of values as the diameter.
|
351
|
+
* Formerly called CENTER_DIAMETER in alpha releases.
|
352
|
+
*/
|
353
|
+
static final int CENTER = 3;
|
354
|
+
/**
|
355
|
+
* Synonym for the CENTER constant. Draw from the center,
|
356
|
+
* using second pair of values as the diameter.
|
357
|
+
*/
|
358
|
+
static final int DIAMETER = 3;
|
359
|
+
|
360
|
+
|
361
|
+
// arc drawing modes
|
362
|
+
|
363
|
+
//static final int OPEN = 1; // shared
|
364
|
+
static final int CHORD = 2;
|
365
|
+
static final int PIE = 3;
|
366
|
+
|
367
|
+
|
368
|
+
// vertically alignment modes for text
|
369
|
+
|
370
|
+
/** Default vertical alignment for text placement */
|
371
|
+
static final int BASELINE = 0;
|
372
|
+
/** Align text to the top */
|
373
|
+
static final int TOP = 101;
|
374
|
+
/** Align text from the bottom, using the baseline. */
|
375
|
+
static final int BOTTOM = 102;
|
376
|
+
|
377
|
+
|
378
|
+
// uv texture orientation modes
|
379
|
+
|
380
|
+
/** texture coordinates in 0..1 range */
|
381
|
+
static final int NORMAL = 1;
|
382
|
+
/** texture coordinates based on image width/height */
|
383
|
+
static final int IMAGE = 2;
|
384
|
+
|
385
|
+
|
386
|
+
// texture wrapping modes
|
387
|
+
|
388
|
+
/** textures are clamped to their edges */
|
389
|
+
public static final int CLAMP = 0;
|
390
|
+
/** textures wrap around when uv values go outside 0..1 range */
|
391
|
+
public static final int REPEAT = 1;
|
392
|
+
|
393
|
+
|
394
|
+
// text placement modes
|
395
|
+
|
396
|
+
/**
|
397
|
+
* textMode(MODEL) is the default, meaning that characters
|
398
|
+
* will be affected by transformations like any other shapes.
|
399
|
+
*
|
400
|
+
* Changed value in 0093 to not interfere with LEFT, CENTER, and RIGHT.
|
401
|
+
*/
|
402
|
+
static final int MODEL = 4;
|
403
|
+
|
404
|
+
/**
|
405
|
+
* textMode(SHAPE) draws text using the the glyph outlines of
|
406
|
+
* individual characters rather than as textures. If the outlines are
|
407
|
+
* not available, then textMode(SHAPE) will be ignored and textMode(MODEL)
|
408
|
+
* will be used instead. For this reason, be sure to call textMode()
|
409
|
+
* <EM>after</EM> calling textFont().
|
410
|
+
*
|
411
|
+
* Currently, textMode(SHAPE) is only supported by OPENGL mode.
|
412
|
+
* It also requires Java 1.2 or higher (OPENGL requires 1.4 anyway)
|
413
|
+
*/
|
414
|
+
static final int SHAPE = 5;
|
415
|
+
|
416
|
+
|
417
|
+
// text alignment modes
|
418
|
+
// are inherited from LEFT, CENTER, RIGHT
|
419
|
+
|
420
|
+
// stroke modes
|
421
|
+
|
422
|
+
static final int SQUARE = 1; // called 'butt' in the svg spec
|
423
|
+
static final int ROUND = 1 << 1;
|
424
|
+
static final int PROJECT = 1 << 2; // called 'square' in the svg spec
|
425
|
+
static final int MITER = 1 << 3;
|
426
|
+
static final int BEVEL = 1 << 5;
|
427
|
+
|
428
|
+
|
429
|
+
// lighting
|
430
|
+
|
431
|
+
static final int AMBIENT = 0;
|
432
|
+
static final int DIRECTIONAL = 1;
|
433
|
+
//static final int POINT = 2; // shared with shape feature
|
434
|
+
static final int SPOT = 3;
|
435
|
+
|
436
|
+
|
437
|
+
// key constants
|
438
|
+
|
439
|
+
// only including the most-used of these guys
|
440
|
+
// if people need more esoteric keys, they can learn about
|
441
|
+
// the esoteric java KeyEvent api and of virtual keys
|
442
|
+
|
443
|
+
// both key and keyCode will equal these values
|
444
|
+
// for 0125, these were changed to 'char' values, because they
|
445
|
+
// can be upgraded to ints automatically by Java, but having them
|
446
|
+
// as ints prevented split(blah, TAB) from working
|
447
|
+
static final char BACKSPACE = 8;
|
448
|
+
static final char TAB = 9;
|
449
|
+
static final char ENTER = 10;
|
450
|
+
static final char RETURN = 13;
|
451
|
+
static final char ESC = 27;
|
452
|
+
static final char DELETE = 127;
|
453
|
+
|
454
|
+
// i.e. if ((key == CODED) && (keyCode == UP))
|
455
|
+
static final int CODED = 0xffff;
|
456
|
+
|
457
|
+
// key will be CODED and keyCode will be this value
|
458
|
+
static final int UP = KeyEvent.VK_UP;
|
459
|
+
static final int DOWN = KeyEvent.VK_DOWN;
|
460
|
+
static final int LEFT = KeyEvent.VK_LEFT;
|
461
|
+
static final int RIGHT = KeyEvent.VK_RIGHT;
|
462
|
+
|
463
|
+
// key will be CODED and keyCode will be this value
|
464
|
+
static final int ALT = KeyEvent.VK_ALT;
|
465
|
+
static final int CONTROL = KeyEvent.VK_CONTROL;
|
466
|
+
static final int SHIFT = KeyEvent.VK_SHIFT;
|
467
|
+
|
468
|
+
|
469
|
+
// orientations (only used on Android, ignored on desktop)
|
470
|
+
|
471
|
+
/** Screen orientation constant for portrait (the hamburger way). */
|
472
|
+
static final int PORTRAIT = 1;
|
473
|
+
/** Screen orientation constant for landscape (the hot dog way). */
|
474
|
+
static final int LANDSCAPE = 2;
|
475
|
+
|
476
|
+
/** Use with fullScreen() to indicate all available displays. */
|
477
|
+
static final int SPAN = 0;
|
478
|
+
|
479
|
+
// cursor types
|
480
|
+
|
481
|
+
static final int ARROW = Cursor.DEFAULT_CURSOR;
|
482
|
+
static final int CROSS = Cursor.CROSSHAIR_CURSOR;
|
483
|
+
static final int HAND = Cursor.HAND_CURSOR;
|
484
|
+
static final int MOVE = Cursor.MOVE_CURSOR;
|
485
|
+
static final int TEXT = Cursor.TEXT_CURSOR;
|
486
|
+
static final int WAIT = Cursor.WAIT_CURSOR;
|
487
|
+
|
488
|
+
|
489
|
+
// hints - hint values are positive for the alternate version,
|
490
|
+
// negative of the same value returns to the normal/default state
|
491
|
+
|
492
|
+
@Deprecated
|
493
|
+
static final int ENABLE_NATIVE_FONTS = 1;
|
494
|
+
@Deprecated
|
495
|
+
static final int DISABLE_NATIVE_FONTS = -1;
|
496
|
+
|
497
|
+
static final int DISABLE_DEPTH_TEST = 2;
|
498
|
+
static final int ENABLE_DEPTH_TEST = -2;
|
499
|
+
|
500
|
+
static final int ENABLE_DEPTH_SORT = 3;
|
501
|
+
static final int DISABLE_DEPTH_SORT = -3;
|
502
|
+
|
503
|
+
static final int DISABLE_OPENGL_ERRORS = 4;
|
504
|
+
static final int ENABLE_OPENGL_ERRORS = -4;
|
505
|
+
|
506
|
+
static final int DISABLE_DEPTH_MASK = 5;
|
507
|
+
static final int ENABLE_DEPTH_MASK = -5;
|
508
|
+
|
509
|
+
static final int DISABLE_OPTIMIZED_STROKE = 6;
|
510
|
+
static final int ENABLE_OPTIMIZED_STROKE = -6;
|
511
|
+
|
512
|
+
static final int ENABLE_STROKE_PERSPECTIVE = 7;
|
513
|
+
static final int DISABLE_STROKE_PERSPECTIVE = -7;
|
514
|
+
|
515
|
+
static final int DISABLE_TEXTURE_MIPMAPS = 8;
|
516
|
+
static final int ENABLE_TEXTURE_MIPMAPS = -8;
|
517
|
+
|
518
|
+
static final int ENABLE_STROKE_PURE = 9;
|
519
|
+
static final int DISABLE_STROKE_PURE = -9;
|
520
|
+
|
521
|
+
static final int ENABLE_BUFFER_READING = 10;
|
522
|
+
static final int DISABLE_BUFFER_READING = -10;
|
523
|
+
|
524
|
+
static final int DISABLE_KEY_REPEAT = 11;
|
525
|
+
static final int ENABLE_KEY_REPEAT = -11;
|
526
|
+
|
527
|
+
static final int DISABLE_ASYNC_SAVEFRAME = 12;
|
528
|
+
static final int ENABLE_ASYNC_SAVEFRAME = -12;
|
529
|
+
|
530
|
+
static final int HINT_COUNT = 13;
|
501
531
|
}
|