picrate 0.2.0-java → 0.3.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -5
- data/Rakefile +10 -2
- data/docs/_posts/2018-06-26-auto_install_picrate.md +15 -0
- data/lib/export.txt +8 -0
- data/lib/picrate/app.rb +4 -4
- data/lib/picrate/version.rb +1 -1
- data/picrate.gemspec +1 -1
- data/pom.rb +1 -1
- data/pom.xml +1 -1
- data/src/main/java/processing/awt/PGraphicsJava2D.java +16 -85
- data/src/main/java/processing/awt/PShapeJava2D.java +9 -33
- data/src/main/java/processing/awt/PSurfaceAWT.java +76 -169
- data/src/main/java/processing/core/PApplet.java +14019 -15963
- data/src/main/java/processing/core/PConstants.java +475 -981
- data/src/main/java/processing/core/PFont.java +50 -202
- data/src/main/java/processing/core/PGraphics.java +7330 -8477
- data/src/main/java/processing/core/PImage.java +42 -212
- data/src/main/java/processing/core/PMatrix.java +21 -160
- data/src/main/java/processing/core/PMatrix2D.java +18 -178
- data/src/main/java/processing/core/PMatrix3D.java +48 -324
- data/src/main/java/processing/core/PShape.java +294 -1181
- data/src/main/java/processing/core/PShapeOBJ.java +16 -91
- data/src/main/java/processing/core/PShapeSVG.java +53 -253
- data/src/main/java/processing/core/PStyle.java +34 -179
- data/src/main/java/processing/core/PSurface.java +13 -94
- data/src/main/java/processing/core/PSurfaceNone.java +35 -140
- data/src/main/java/processing/core/PVector.java +10 -87
- data/src/main/java/processing/event/Event.java +86 -69
- data/src/main/java/processing/event/MouseEvent.java +102 -102
- data/src/main/java/processing/opengl/PGL.java +23 -16
- data/src/main/java/processing/opengl/PGraphicsOpenGL.java +13 -10
- data/src/main/java/processing/opengl/PJOGL.java +32 -12
- data/src/main/java/processing/opengl/shaders/LightVert-brcm.glsl +154 -0
- data/src/main/java/processing/opengl/shaders/LightVert-vc4.glsl +2 -2
- data/src/main/java/processing/opengl/shaders/TexLightVert-brcm.glsl +160 -0
- data/src/main/java/processing/opengl/shaders/TexLightVert-vc4.glsl +2 -2
- metadata +7 -3
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
2
2
|
|
3
|
-
|
3
|
+
/*
|
4
4
|
Part of the Processing project - http://processing.org
|
5
5
|
|
6
6
|
Copyright (c) 2004-11 Ben Fry and Casey Reas
|
@@ -20,41 +20,33 @@
|
|
20
20
|
Public License along with this library; if not, write to the
|
21
21
|
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
22
22
|
Boston, MA 02111-1307 USA
|
23
|
-
|
23
|
+
*/
|
24
|
+
|
24
25
|
package processing.core;
|
25
26
|
|
26
27
|
import java.awt.Cursor;
|
27
28
|
import java.awt.event.KeyEvent;
|
28
29
|
|
30
|
+
|
29
31
|
/**
|
30
32
|
* Numbers shared throughout processing.core.
|
31
|
-
* <
|
32
|
-
* An attempt is made to keep the constants as short/non-verbose
|
33
|
-
* For instance, the constant is TIFF instead of
|
34
|
-
* as long as we can get away with it.
|
33
|
+
* <P>
|
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.
|
35
37
|
*
|
36
38
|
* @usage Web & Application
|
37
39
|
*/
|
38
40
|
public interface PConstants {
|
39
41
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
static public final int X = 0;
|
42
|
+
static public final int X = 0;
|
43
|
+
static public final int Y = 1;
|
44
|
+
static public final int Z = 2;
|
44
45
|
|
45
|
-
/**
|
46
|
-
*
|
47
|
-
*/
|
48
|
-
static public final int Y = 1;
|
49
46
|
|
50
|
-
|
51
|
-
*
|
52
|
-
*/
|
53
|
-
static public final int Z = 2;
|
47
|
+
// renderers known to processing.core
|
54
48
|
|
55
|
-
|
56
|
-
|
57
|
-
/*
|
49
|
+
/*
|
58
50
|
// List of renderers used inside PdePreprocessor
|
59
51
|
static final StringList rendererList = new StringList(new String[] {
|
60
52
|
"JAVA2D", "JAVA2D_2X",
|
@@ -63,971 +55,473 @@ public interface PConstants {
|
|
63
55
|
"LWJGL.P2D", "LWJGL.P3D", // hmm
|
64
56
|
"PDF" // no DXF because that's only for beginRaw()
|
65
57
|
});
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
*
|
79
|
-
*/
|
80
|
-
static final String P3D = "processing.opengl.PGraphics3D";
|
81
|
-
|
82
|
-
// When will it be time to remove this?
|
83
|
-
/**
|
84
|
-
*
|
85
|
-
* @deprecated
|
86
|
-
*/
|
87
|
-
@Deprecated
|
88
|
-
static final String OPENGL = P3D;
|
89
|
-
|
90
|
-
// Experimental, higher-performance Java 2D renderer (but no pixel ops)
|
58
|
+
*/
|
59
|
+
|
60
|
+
static final String JAVA2D = "processing.awt.PGraphicsJava2D";
|
61
|
+
|
62
|
+
static final String P2D = "processing.opengl.PGraphics2D";
|
63
|
+
static final String P3D = "processing.opengl.PGraphics3D";
|
64
|
+
|
65
|
+
// When will it be time to remove this?
|
66
|
+
@Deprecated
|
67
|
+
static final String OPENGL = P3D;
|
68
|
+
|
69
|
+
// Experimental, higher-performance Java 2D renderer (but no pixel ops)
|
91
70
|
// static final String E2D = PGraphicsDanger2D.class.getName();
|
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
|
-
|
220
|
-
|
221
|
-
|
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
|
-
* @webref constants
|
253
|
-
* @see PConstants#PI
|
254
|
-
* @see PConstants#TWO_PI
|
255
|
-
* @see PConstants#TAU
|
256
|
-
* @see PConstants#HALF_PI
|
257
|
-
*/
|
258
|
-
static final float QUARTER_PI = (float) (Math.PI / 4.0);
|
259
|
-
/**
|
260
|
-
* ( begin auto-generated from TWO_PI.xml )
|
261
|
-
*
|
262
|
-
* TWO_PI is a mathematical constant with the value 6.28318530717958647693.
|
263
|
-
* It is twice the ratio of the circumference of a circle to its diameter.
|
264
|
-
* It is useful in combination with the trigonometric functions
|
265
|
-
* <b>sin()</b> and <b>cos()</b>.
|
266
|
-
*
|
267
|
-
* ( end auto-generated )
|
268
|
-
*
|
269
|
-
* @webref constants
|
270
|
-
* @see PConstants#PI
|
271
|
-
* @see PConstants#TAU
|
272
|
-
* @see PConstants#HALF_PI
|
273
|
-
* @see PConstants#QUARTER_PI
|
274
|
-
*/
|
275
|
-
static final float TWO_PI = (float) (2.0 * Math.PI);
|
276
|
-
/**
|
277
|
-
* ( begin auto-generated from TAU.xml )
|
278
|
-
*
|
279
|
-
* TAU is an alias for TWO_PI, a mathematical constant with the value
|
280
|
-
* 6.28318530717958647693. It is twice the ratio of the circumference of a
|
281
|
-
* circle to its diameter. It is useful in combination with the
|
282
|
-
* trigonometric functions <b>sin()</b> and <b>cos()</b>.
|
283
|
-
*
|
284
|
-
* ( end auto-generated )
|
285
|
-
*
|
286
|
-
* @webref constants
|
287
|
-
* @see PConstants#PI
|
288
|
-
* @see PConstants#TWO_PI
|
289
|
-
* @see PConstants#HALF_PI
|
290
|
-
* @see PConstants#QUARTER_PI
|
291
|
-
*/
|
292
|
-
static final float TAU = (float) (2.0 * Math.PI);
|
293
|
-
|
294
|
-
/**
|
295
|
-
*
|
296
|
-
*/
|
297
|
-
static final float DEG_TO_RAD = PI / 180.0f;
|
298
|
-
|
299
|
-
/**
|
300
|
-
*
|
301
|
-
*/
|
302
|
-
static final float RAD_TO_DEG = 180.0f / PI;
|
303
|
-
|
304
|
-
// angle modes
|
305
|
-
//static final int RADIANS = 0;
|
306
|
-
//static final int DEGREES = 1;
|
307
|
-
// used by split, all the standard whitespace chars
|
308
|
-
// (also includes unicode nbsp, that little bostage)
|
309
|
-
/**
|
310
|
-
*
|
311
|
-
*/
|
312
|
-
static final String WHITESPACE = " \t\n\r\f\u00A0";
|
313
|
-
|
314
|
-
// for colors and/or images
|
315
|
-
/**
|
316
|
-
*
|
317
|
-
*/
|
318
|
-
static final int RGB = 1; // image & color
|
319
|
-
|
320
|
-
/**
|
321
|
-
*
|
322
|
-
*/
|
323
|
-
static final int ARGB = 2; // image
|
324
|
-
|
325
|
-
/**
|
326
|
-
*
|
327
|
-
*/
|
328
|
-
static final int HSB = 3; // color
|
329
|
-
|
330
|
-
/**
|
331
|
-
*
|
332
|
-
*/
|
333
|
-
static final int ALPHA = 4; // image
|
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 MACOSX = 2;
|
84
|
+
static final int LINUX = 3;
|
85
|
+
|
86
|
+
static final String[] platformNames = {
|
87
|
+
"other", "windows", "macosx", "linux"
|
88
|
+
};
|
89
|
+
|
90
|
+
|
91
|
+
static final float EPSILON = 0.0001f;
|
92
|
+
|
93
|
+
|
94
|
+
// max/min values for numbers
|
95
|
+
|
96
|
+
/**
|
97
|
+
* Same as Float.MAX_VALUE, but included for parity with MIN_VALUE,
|
98
|
+
* and to avoid teaching static methods on the first day.
|
99
|
+
*/
|
100
|
+
static final float MAX_FLOAT = Float.MAX_VALUE;
|
101
|
+
/**
|
102
|
+
* Note that Float.MIN_VALUE is the smallest <EM>positive</EM> value
|
103
|
+
* for a floating point number, not actually the minimum (negative) value
|
104
|
+
* for a float. This constant equals 0xFF7FFFFF, the smallest (farthest
|
105
|
+
* negative) value a float can have before it hits NaN.
|
106
|
+
*/
|
107
|
+
static final float MIN_FLOAT = -Float.MAX_VALUE;
|
108
|
+
/** Largest possible (positive) integer value */
|
109
|
+
static final int MAX_INT = Integer.MAX_VALUE;
|
110
|
+
/** Smallest possible (negative) integer value */
|
111
|
+
static final int MIN_INT = Integer.MIN_VALUE;
|
112
|
+
|
113
|
+
// shapes
|
114
|
+
|
115
|
+
static public final int VERTEX = 0;
|
116
|
+
static public final int BEZIER_VERTEX = 1;
|
117
|
+
static public final int QUADRATIC_VERTEX = 2;
|
118
|
+
static public final int CURVE_VERTEX = 3;
|
119
|
+
static public final int BREAK = 4;
|
120
|
+
|
121
|
+
@Deprecated
|
122
|
+
static public final int QUAD_BEZIER_VERTEX = 2; // should not have been exposed
|
123
|
+
|
124
|
+
// useful goodness
|
125
|
+
|
126
|
+
/**
|
127
|
+
* ( begin auto-generated from PI.xml )
|
128
|
+
*
|
129
|
+
* PI is a mathematical constant with the value 3.14159265358979323846. It
|
130
|
+
* is the ratio of the circumference of a circle to its diameter. It is
|
131
|
+
* useful in combination with the trigonometric functions <b>sin()</b> and
|
132
|
+
* <b>cos()</b>.
|
133
|
+
*
|
134
|
+
* ( end auto-generated )
|
135
|
+
* @webref constants
|
136
|
+
* @see PConstants#TWO_PI
|
137
|
+
* @see PConstants#TAU
|
138
|
+
* @see PConstants#HALF_PI
|
139
|
+
* @see PConstants#QUARTER_PI
|
140
|
+
*
|
141
|
+
*/
|
142
|
+
static final float PI = (float) Math.PI;
|
143
|
+
/**
|
144
|
+
* ( begin auto-generated from HALF_PI.xml )
|
145
|
+
*
|
146
|
+
* HALF_PI is a mathematical constant with the value
|
147
|
+
* 1.57079632679489661923. It is half the ratio of the circumference of a
|
148
|
+
* circle to its diameter. It is useful in combination with the
|
149
|
+
* trigonometric functions <b>sin()</b> and <b>cos()</b>.
|
150
|
+
*
|
151
|
+
* ( end auto-generated )
|
152
|
+
* @webref constants
|
153
|
+
* @see PConstants#PI
|
154
|
+
* @see PConstants#TWO_PI
|
155
|
+
* @see PConstants#TAU
|
156
|
+
* @see PConstants#QUARTER_PI
|
157
|
+
*/
|
158
|
+
static final float HALF_PI = (float) (Math.PI / 2.0);
|
159
|
+
static final float THIRD_PI = (float) (Math.PI / 3.0);
|
160
|
+
/**
|
161
|
+
* ( begin auto-generated from QUARTER_PI.xml )
|
162
|
+
*
|
163
|
+
* QUARTER_PI is a mathematical constant with the value 0.7853982. It is
|
164
|
+
* one quarter the ratio of the circumference of a circle to its diameter.
|
165
|
+
* It is useful in combination with the trigonometric functions
|
166
|
+
* <b>sin()</b> and <b>cos()</b>.
|
167
|
+
*
|
168
|
+
* ( end auto-generated )
|
169
|
+
* @webref constants
|
170
|
+
* @see PConstants#PI
|
171
|
+
* @see PConstants#TWO_PI
|
172
|
+
* @see PConstants#TAU
|
173
|
+
* @see PConstants#HALF_PI
|
174
|
+
*/
|
175
|
+
static final float QUARTER_PI = (float) (Math.PI / 4.0);
|
176
|
+
/**
|
177
|
+
* ( begin auto-generated from TWO_PI.xml )
|
178
|
+
*
|
179
|
+
* TWO_PI is a mathematical constant with the value 6.28318530717958647693.
|
180
|
+
* It is twice the ratio of the circumference of a circle to its diameter.
|
181
|
+
* It is useful in combination with the trigonometric functions
|
182
|
+
* <b>sin()</b> and <b>cos()</b>.
|
183
|
+
*
|
184
|
+
* ( end auto-generated )
|
185
|
+
* @webref constants
|
186
|
+
* @see PConstants#PI
|
187
|
+
* @see PConstants#TAU
|
188
|
+
* @see PConstants#HALF_PI
|
189
|
+
* @see PConstants#QUARTER_PI
|
190
|
+
*/
|
191
|
+
static final float TWO_PI = (float) (2.0 * Math.PI);
|
192
|
+
/**
|
193
|
+
* ( begin auto-generated from TAU.xml )
|
194
|
+
*
|
195
|
+
* TAU is an alias for TWO_PI, a mathematical constant with the value
|
196
|
+
* 6.28318530717958647693. It is twice the ratio of the circumference
|
197
|
+
* of a circle to its diameter. It is useful in combination with the
|
198
|
+
* trigonometric functions <b>sin()</b> and <b>cos()</b>.
|
199
|
+
*
|
200
|
+
* ( end auto-generated )
|
201
|
+
* @webref constants
|
202
|
+
* @see PConstants#PI
|
203
|
+
* @see PConstants#TWO_PI
|
204
|
+
* @see PConstants#HALF_PI
|
205
|
+
* @see PConstants#QUARTER_PI
|
206
|
+
*/
|
207
|
+
static final float TAU = (float) (2.0 * Math.PI);
|
208
|
+
|
209
|
+
static final float DEG_TO_RAD = PI/180.0f;
|
210
|
+
static final float RAD_TO_DEG = 180.0f/PI;
|
211
|
+
|
212
|
+
|
213
|
+
// angle modes
|
214
|
+
|
215
|
+
//static final int RADIANS = 0;
|
216
|
+
//static final int DEGREES = 1;
|
217
|
+
|
218
|
+
|
219
|
+
// used by split, all the standard whitespace chars
|
220
|
+
// (also includes unicode nbsp, that little bostage)
|
221
|
+
|
222
|
+
static final String WHITESPACE = " \t\n\r\f\u00A0";
|
223
|
+
|
224
|
+
|
225
|
+
// for colors and/or images
|
226
|
+
|
227
|
+
static final int RGB = 1; // image & color
|
228
|
+
static final int ARGB = 2; // image
|
229
|
+
static final int HSB = 3; // color
|
230
|
+
static final int ALPHA = 4; // image
|
334
231
|
// static final int CMYK = 5; // image & color (someday)
|
335
232
|
|
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
|
-
public final static int DARKEST = 1 << 4;
|
429
|
-
|
430
|
-
/**
|
431
|
-
*
|
432
|
-
*/
|
433
|
-
public final static int DIFFERENCE = 1 << 5;
|
434
|
-
|
435
|
-
/**
|
436
|
-
*
|
437
|
-
*/
|
438
|
-
public final static int EXCLUSION = 1 << 6;
|
439
|
-
|
440
|
-
/**
|
441
|
-
*
|
442
|
-
*/
|
443
|
-
public final static int MULTIPLY = 1 << 7;
|
444
|
-
|
445
|
-
/**
|
446
|
-
*
|
447
|
-
*/
|
448
|
-
public final static int SCREEN = 1 << 8;
|
449
|
-
|
450
|
-
/**
|
451
|
-
*
|
452
|
-
*/
|
453
|
-
public final static int OVERLAY = 1 << 9;
|
454
|
-
|
455
|
-
/**
|
456
|
-
*
|
457
|
-
*/
|
458
|
-
public final static int HARD_LIGHT = 1 << 10;
|
459
|
-
|
460
|
-
/**
|
461
|
-
*
|
462
|
-
*/
|
463
|
-
public final static int SOFT_LIGHT = 1 << 11;
|
464
|
-
|
465
|
-
/**
|
466
|
-
*
|
467
|
-
*/
|
468
|
-
public final static int DODGE = 1 << 12;
|
469
|
-
|
470
|
-
/**
|
471
|
-
*
|
472
|
-
*/
|
473
|
-
public final static int BURN = 1 << 13;
|
474
|
-
|
475
|
-
// for messages
|
476
|
-
/**
|
477
|
-
*
|
478
|
-
*/
|
479
|
-
static final int CHATTER = 0;
|
480
|
-
|
481
|
-
/**
|
482
|
-
*
|
483
|
-
*/
|
484
|
-
static final int COMPLAINT = 1;
|
485
|
-
|
486
|
-
/**
|
487
|
-
*
|
488
|
-
*/
|
489
|
-
static final int PROBLEM = 2;
|
490
|
-
|
491
|
-
// types of transformation matrices
|
492
|
-
/**
|
493
|
-
*
|
494
|
-
*/
|
495
|
-
static final int PROJECTION = 0;
|
496
|
-
|
497
|
-
/**
|
498
|
-
*
|
499
|
-
*/
|
500
|
-
static final int MODELVIEW = 1;
|
501
|
-
|
502
|
-
// types of projection matrices
|
503
|
-
/**
|
504
|
-
*
|
505
|
-
*/
|
506
|
-
static final int CUSTOM = 0; // user-specified fanciness
|
507
|
-
|
508
|
-
/**
|
509
|
-
*
|
510
|
-
*/
|
511
|
-
static final int ORTHOGRAPHIC = 2; // 2D isometric projection
|
512
|
-
|
513
|
-
/**
|
514
|
-
*
|
515
|
-
*/
|
516
|
-
static final int PERSPECTIVE = 3; // perspective matrix
|
517
|
-
|
518
|
-
// shapes
|
519
|
-
// the low four bits set the variety,
|
520
|
-
// higher bits set the specific shape type
|
521
|
-
/**
|
522
|
-
*
|
523
|
-
*/
|
524
|
-
static final int GROUP = 0; // createShape()
|
525
|
-
|
526
|
-
/**
|
527
|
-
*
|
528
|
-
*/
|
529
|
-
static final int POINT = 2; // primitive
|
530
|
-
|
531
|
-
/**
|
532
|
-
*
|
533
|
-
*/
|
534
|
-
static final int POINTS = 3; // vertices
|
535
|
-
|
536
|
-
/**
|
537
|
-
*
|
538
|
-
*/
|
539
|
-
static final int LINE = 4; // primitive
|
540
|
-
|
541
|
-
/**
|
542
|
-
*
|
543
|
-
*/
|
544
|
-
static final int LINES = 5; // beginShape(), createShape()
|
545
|
-
|
546
|
-
/**
|
547
|
-
*
|
548
|
-
*/
|
549
|
-
static final int LINE_STRIP = 50; // beginShape()
|
550
|
-
|
551
|
-
/**
|
552
|
-
*
|
553
|
-
*/
|
554
|
-
static final int LINE_LOOP = 51;
|
555
|
-
|
556
|
-
/**
|
557
|
-
*
|
558
|
-
*/
|
559
|
-
static final int TRIANGLE = 8; // primitive
|
560
|
-
|
561
|
-
/**
|
562
|
-
*
|
563
|
-
*/
|
564
|
-
static final int TRIANGLES = 9; // vertices
|
565
|
-
|
566
|
-
/**
|
567
|
-
*
|
568
|
-
*/
|
569
|
-
static final int TRIANGLE_STRIP = 10; // vertices
|
570
|
-
|
571
|
-
/**
|
572
|
-
*
|
573
|
-
*/
|
574
|
-
static final int TRIANGLE_FAN = 11; // vertices
|
575
|
-
|
576
|
-
/**
|
577
|
-
*
|
578
|
-
*/
|
579
|
-
static final int QUAD = 16; // primitive
|
580
|
-
|
581
|
-
/**
|
582
|
-
*
|
583
|
-
*/
|
584
|
-
static final int QUADS = 17; // vertices
|
585
|
-
|
586
|
-
/**
|
587
|
-
*
|
588
|
-
*/
|
589
|
-
static final int QUAD_STRIP = 18; // vertices
|
590
|
-
|
591
|
-
/**
|
592
|
-
*
|
593
|
-
*/
|
594
|
-
static final int POLYGON = 20; // in the end, probably cannot
|
595
|
-
|
596
|
-
/**
|
597
|
-
*
|
598
|
-
*/
|
599
|
-
static final int PATH = 21; // separate these two
|
600
|
-
|
601
|
-
/**
|
602
|
-
*
|
603
|
-
*/
|
604
|
-
static final int RECT = 30; // primitive
|
605
|
-
|
606
|
-
/**
|
607
|
-
*
|
608
|
-
*/
|
609
|
-
static final int ELLIPSE = 31; // primitive
|
610
|
-
|
611
|
-
/**
|
612
|
-
*
|
613
|
-
*/
|
614
|
-
static final int ARC = 32; // primitive
|
615
|
-
|
616
|
-
/**
|
617
|
-
*
|
618
|
-
*/
|
619
|
-
static final int SPHERE = 40; // primitive
|
620
|
-
|
621
|
-
/**
|
622
|
-
*
|
623
|
-
*/
|
624
|
-
static final int BOX = 41; // primitive
|
233
|
+
|
234
|
+
// image file types
|
235
|
+
|
236
|
+
static final int TIFF = 0;
|
237
|
+
static final int TARGA = 1;
|
238
|
+
static final int JPEG = 2;
|
239
|
+
static final int GIF = 3;
|
240
|
+
|
241
|
+
|
242
|
+
// filter/convert types
|
243
|
+
|
244
|
+
static final int BLUR = 11;
|
245
|
+
static final int GRAY = 12;
|
246
|
+
static final int INVERT = 13;
|
247
|
+
static final int OPAQUE = 14;
|
248
|
+
static final int POSTERIZE = 15;
|
249
|
+
static final int THRESHOLD = 16;
|
250
|
+
static final int ERODE = 17;
|
251
|
+
static final int DILATE = 18;
|
252
|
+
|
253
|
+
|
254
|
+
// blend mode keyword definitions
|
255
|
+
// @see processing.core.PImage#blendColor(int,int,int)
|
256
|
+
|
257
|
+
public final static int REPLACE = 0;
|
258
|
+
public final static int BLEND = 1 << 0;
|
259
|
+
public final static int ADD = 1 << 1;
|
260
|
+
public final static int SUBTRACT = 1 << 2;
|
261
|
+
public final static int LIGHTEST = 1 << 3;
|
262
|
+
public final static int DARKEST = 1 << 4;
|
263
|
+
public final static int DIFFERENCE = 1 << 5;
|
264
|
+
public final static int EXCLUSION = 1 << 6;
|
265
|
+
public final static int MULTIPLY = 1 << 7;
|
266
|
+
public final static int SCREEN = 1 << 8;
|
267
|
+
public final static int OVERLAY = 1 << 9;
|
268
|
+
public final static int HARD_LIGHT = 1 << 10;
|
269
|
+
public final static int SOFT_LIGHT = 1 << 11;
|
270
|
+
public final static int DODGE = 1 << 12;
|
271
|
+
public final static int BURN = 1 << 13;
|
272
|
+
|
273
|
+
// for messages
|
274
|
+
|
275
|
+
static final int CHATTER = 0;
|
276
|
+
static final int COMPLAINT = 1;
|
277
|
+
static final int PROBLEM = 2;
|
278
|
+
|
279
|
+
|
280
|
+
// types of transformation matrices
|
281
|
+
|
282
|
+
static final int PROJECTION = 0;
|
283
|
+
static final int MODELVIEW = 1;
|
284
|
+
|
285
|
+
// types of projection matrices
|
286
|
+
|
287
|
+
static final int CUSTOM = 0; // user-specified fanciness
|
288
|
+
static final int ORTHOGRAPHIC = 2; // 2D isometric projection
|
289
|
+
static final int PERSPECTIVE = 3; // perspective matrix
|
290
|
+
|
291
|
+
|
292
|
+
// shapes
|
293
|
+
|
294
|
+
// the low four bits set the variety,
|
295
|
+
// higher bits set the specific shape type
|
296
|
+
|
297
|
+
static final int GROUP = 0; // createShape()
|
298
|
+
|
299
|
+
static final int POINT = 2; // primitive
|
300
|
+
static final int POINTS = 3; // vertices
|
301
|
+
|
302
|
+
static final int LINE = 4; // primitive
|
303
|
+
static final int LINES = 5; // beginShape(), createShape()
|
304
|
+
static final int LINE_STRIP = 50; // beginShape()
|
305
|
+
static final int LINE_LOOP = 51;
|
306
|
+
|
307
|
+
static final int TRIANGLE = 8; // primitive
|
308
|
+
static final int TRIANGLES = 9; // vertices
|
309
|
+
static final int TRIANGLE_STRIP = 10; // vertices
|
310
|
+
static final int TRIANGLE_FAN = 11; // vertices
|
311
|
+
|
312
|
+
static final int QUAD = 16; // primitive
|
313
|
+
static final int QUADS = 17; // vertices
|
314
|
+
static final int QUAD_STRIP = 18; // vertices
|
315
|
+
|
316
|
+
static final int POLYGON = 20; // in the end, probably cannot
|
317
|
+
static final int PATH = 21; // separate these two
|
318
|
+
|
319
|
+
static final int RECT = 30; // primitive
|
320
|
+
static final int ELLIPSE = 31; // primitive
|
321
|
+
static final int ARC = 32; // primitive
|
322
|
+
|
323
|
+
static final int SPHERE = 40; // primitive
|
324
|
+
static final int BOX = 41; // primitive
|
625
325
|
|
626
326
|
// static public final int POINT_SPRITES = 52;
|
627
327
|
// static public final int NON_STROKED_SHAPE = 60;
|
628
328
|
// static public final int STROKED_SHAPE = 61;
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
*
|
828
|
-
*/
|
829
|
-
static final int DOWN = KeyEvent.VK_DOWN;
|
830
|
-
|
831
|
-
/**
|
832
|
-
*
|
833
|
-
*/
|
834
|
-
static final int LEFT = KeyEvent.VK_LEFT;
|
835
|
-
|
836
|
-
/**
|
837
|
-
*
|
838
|
-
*/
|
839
|
-
static final int RIGHT = KeyEvent.VK_RIGHT;
|
840
|
-
|
841
|
-
// key will be CODED and keyCode will be this value
|
842
|
-
/**
|
843
|
-
*
|
844
|
-
*/
|
845
|
-
static final int ALT = KeyEvent.VK_ALT;
|
846
|
-
|
847
|
-
/**
|
848
|
-
*
|
849
|
-
*/
|
850
|
-
static final int CONTROL = KeyEvent.VK_CONTROL;
|
851
|
-
|
852
|
-
/**
|
853
|
-
*
|
854
|
-
*/
|
855
|
-
static final int SHIFT = KeyEvent.VK_SHIFT;
|
856
|
-
|
857
|
-
// orientations (only used on Android, ignored on desktop)
|
858
|
-
/**
|
859
|
-
* Screen orientation constant for portrait (the hamburger way).
|
860
|
-
*/
|
861
|
-
static final int PORTRAIT = 1;
|
862
|
-
/**
|
863
|
-
* Screen orientation constant for landscape (the hot dog way).
|
864
|
-
*/
|
865
|
-
static final int LANDSCAPE = 2;
|
866
|
-
|
867
|
-
/**
|
868
|
-
* Use with fullScreen() to indicate all available displays.
|
869
|
-
*/
|
870
|
-
static final int SPAN = 0;
|
871
|
-
|
872
|
-
// cursor types
|
873
|
-
/**
|
874
|
-
*
|
875
|
-
*/
|
876
|
-
static final int ARROW = Cursor.DEFAULT_CURSOR;
|
877
|
-
|
878
|
-
/**
|
879
|
-
*
|
880
|
-
*/
|
881
|
-
static final int CROSS = Cursor.CROSSHAIR_CURSOR;
|
882
|
-
|
883
|
-
/**
|
884
|
-
*
|
885
|
-
*/
|
886
|
-
static final int HAND = Cursor.HAND_CURSOR;
|
887
|
-
|
888
|
-
/**
|
889
|
-
*
|
890
|
-
*/
|
891
|
-
static final int MOVE = Cursor.MOVE_CURSOR;
|
892
|
-
|
893
|
-
/**
|
894
|
-
*
|
895
|
-
*/
|
896
|
-
static final int TEXT = Cursor.TEXT_CURSOR;
|
897
|
-
|
898
|
-
/**
|
899
|
-
*
|
900
|
-
*/
|
901
|
-
static final int WAIT = Cursor.WAIT_CURSOR;
|
902
|
-
|
903
|
-
// hints - hint values are positive for the alternate version,
|
904
|
-
// negative of the same value returns to the normal/default state
|
905
|
-
/**
|
906
|
-
*
|
907
|
-
* @deprecated
|
908
|
-
*/
|
909
|
-
@Deprecated
|
910
|
-
static final int ENABLE_NATIVE_FONTS = 1;
|
911
|
-
|
912
|
-
/**
|
913
|
-
*
|
914
|
-
* @deprecated
|
915
|
-
*/
|
916
|
-
@Deprecated
|
917
|
-
static final int DISABLE_NATIVE_FONTS = -1;
|
918
|
-
|
919
|
-
/**
|
920
|
-
*
|
921
|
-
*/
|
922
|
-
static final int DISABLE_DEPTH_TEST = 2;
|
923
|
-
|
924
|
-
/**
|
925
|
-
*
|
926
|
-
*/
|
927
|
-
static final int ENABLE_DEPTH_TEST = -2;
|
928
|
-
|
929
|
-
/**
|
930
|
-
*
|
931
|
-
*/
|
932
|
-
static final int ENABLE_DEPTH_SORT = 3;
|
933
|
-
|
934
|
-
/**
|
935
|
-
*
|
936
|
-
*/
|
937
|
-
static final int DISABLE_DEPTH_SORT = -3;
|
938
|
-
|
939
|
-
/**
|
940
|
-
*
|
941
|
-
*/
|
942
|
-
static final int DISABLE_OPENGL_ERRORS = 4;
|
943
|
-
|
944
|
-
/**
|
945
|
-
*
|
946
|
-
*/
|
947
|
-
static final int ENABLE_OPENGL_ERRORS = -4;
|
948
|
-
|
949
|
-
/**
|
950
|
-
*
|
951
|
-
*/
|
952
|
-
static final int DISABLE_DEPTH_MASK = 5;
|
953
|
-
|
954
|
-
/**
|
955
|
-
*
|
956
|
-
*/
|
957
|
-
static final int ENABLE_DEPTH_MASK = -5;
|
958
|
-
|
959
|
-
/**
|
960
|
-
*
|
961
|
-
*/
|
962
|
-
static final int DISABLE_OPTIMIZED_STROKE = 6;
|
963
|
-
|
964
|
-
/**
|
965
|
-
*
|
966
|
-
*/
|
967
|
-
static final int ENABLE_OPTIMIZED_STROKE = -6;
|
968
|
-
|
969
|
-
/**
|
970
|
-
*
|
971
|
-
*/
|
972
|
-
static final int ENABLE_STROKE_PERSPECTIVE = 7;
|
973
|
-
|
974
|
-
/**
|
975
|
-
*
|
976
|
-
*/
|
977
|
-
static final int DISABLE_STROKE_PERSPECTIVE = -7;
|
978
|
-
|
979
|
-
/**
|
980
|
-
*
|
981
|
-
*/
|
982
|
-
static final int DISABLE_TEXTURE_MIPMAPS = 8;
|
983
|
-
|
984
|
-
/**
|
985
|
-
*
|
986
|
-
*/
|
987
|
-
static final int ENABLE_TEXTURE_MIPMAPS = -8;
|
988
|
-
|
989
|
-
/**
|
990
|
-
*
|
991
|
-
*/
|
992
|
-
static final int ENABLE_STROKE_PURE = 9;
|
993
|
-
|
994
|
-
/**
|
995
|
-
*
|
996
|
-
*/
|
997
|
-
static final int DISABLE_STROKE_PURE = -9;
|
998
|
-
|
999
|
-
/**
|
1000
|
-
*
|
1001
|
-
*/
|
1002
|
-
static final int ENABLE_BUFFER_READING = 10;
|
1003
|
-
|
1004
|
-
/**
|
1005
|
-
*
|
1006
|
-
*/
|
1007
|
-
static final int DISABLE_BUFFER_READING = -10;
|
1008
|
-
|
1009
|
-
/**
|
1010
|
-
*
|
1011
|
-
*/
|
1012
|
-
static final int DISABLE_KEY_REPEAT = 11;
|
1013
|
-
|
1014
|
-
/**
|
1015
|
-
*
|
1016
|
-
*/
|
1017
|
-
static final int ENABLE_KEY_REPEAT = -11;
|
1018
|
-
|
1019
|
-
/**
|
1020
|
-
*
|
1021
|
-
*/
|
1022
|
-
static final int DISABLE_ASYNC_SAVEFRAME = 12;
|
1023
|
-
|
1024
|
-
/**
|
1025
|
-
*
|
1026
|
-
*/
|
1027
|
-
static final int ENABLE_ASYNC_SAVEFRAME = -12;
|
1028
|
-
|
1029
|
-
/**
|
1030
|
-
*
|
1031
|
-
*/
|
1032
|
-
static final int HINT_COUNT = 13;
|
329
|
+
|
330
|
+
|
331
|
+
// shape closing modes
|
332
|
+
|
333
|
+
static final int OPEN = 1;
|
334
|
+
static final int CLOSE = 2;
|
335
|
+
|
336
|
+
|
337
|
+
// shape drawing modes
|
338
|
+
|
339
|
+
/** Draw mode convention to use (x, y) to (width, height) */
|
340
|
+
static final int CORNER = 0;
|
341
|
+
/** Draw mode convention to use (x1, y1) to (x2, y2) coordinates */
|
342
|
+
static final int CORNERS = 1;
|
343
|
+
/** Draw mode from the center, and using the radius */
|
344
|
+
static final int RADIUS = 2;
|
345
|
+
/**
|
346
|
+
* Draw from the center, using second pair of values as the diameter.
|
347
|
+
* Formerly called CENTER_DIAMETER in alpha releases.
|
348
|
+
*/
|
349
|
+
static final int CENTER = 3;
|
350
|
+
/**
|
351
|
+
* Synonym for the CENTER constant. Draw from the center,
|
352
|
+
* using second pair of values as the diameter.
|
353
|
+
*/
|
354
|
+
static final int DIAMETER = 3;
|
355
|
+
|
356
|
+
|
357
|
+
// arc drawing modes
|
358
|
+
|
359
|
+
//static final int OPEN = 1; // shared
|
360
|
+
static final int CHORD = 2;
|
361
|
+
static final int PIE = 3;
|
362
|
+
|
363
|
+
|
364
|
+
// vertically alignment modes for text
|
365
|
+
|
366
|
+
/** Default vertical alignment for text placement */
|
367
|
+
static final int BASELINE = 0;
|
368
|
+
/** Align text to the top */
|
369
|
+
static final int TOP = 101;
|
370
|
+
/** Align text from the bottom, using the baseline. */
|
371
|
+
static final int BOTTOM = 102;
|
372
|
+
|
373
|
+
|
374
|
+
// uv texture orientation modes
|
375
|
+
|
376
|
+
/** texture coordinates in 0..1 range */
|
377
|
+
static final int NORMAL = 1;
|
378
|
+
/** texture coordinates based on image width/height */
|
379
|
+
static final int IMAGE = 2;
|
380
|
+
|
381
|
+
|
382
|
+
// texture wrapping modes
|
383
|
+
|
384
|
+
/** textures are clamped to their edges */
|
385
|
+
public static final int CLAMP = 0;
|
386
|
+
/** textures wrap around when uv values go outside 0..1 range */
|
387
|
+
public static final int REPEAT = 1;
|
388
|
+
|
389
|
+
|
390
|
+
// text placement modes
|
391
|
+
|
392
|
+
/**
|
393
|
+
* textMode(MODEL) is the default, meaning that characters
|
394
|
+
* will be affected by transformations like any other shapes.
|
395
|
+
* <p/>
|
396
|
+
* Changed value in 0093 to not interfere with LEFT, CENTER, and RIGHT.
|
397
|
+
*/
|
398
|
+
static final int MODEL = 4;
|
399
|
+
|
400
|
+
/**
|
401
|
+
* textMode(SHAPE) draws text using the the glyph outlines of
|
402
|
+
* individual characters rather than as textures. If the outlines are
|
403
|
+
* not available, then textMode(SHAPE) will be ignored and textMode(MODEL)
|
404
|
+
* will be used instead. For this reason, be sure to call textMode()
|
405
|
+
* <EM>after</EM> calling textFont().
|
406
|
+
* <p/>
|
407
|
+
* Currently, textMode(SHAPE) is only supported by OPENGL mode.
|
408
|
+
* It also requires Java 1.2 or higher (OPENGL requires 1.4 anyway)
|
409
|
+
*/
|
410
|
+
static final int SHAPE = 5;
|
411
|
+
|
412
|
+
|
413
|
+
// text alignment modes
|
414
|
+
// are inherited from LEFT, CENTER, RIGHT
|
415
|
+
|
416
|
+
// stroke modes
|
417
|
+
|
418
|
+
static final int SQUARE = 1 << 0; // called 'butt' in the svg spec
|
419
|
+
static final int ROUND = 1 << 1;
|
420
|
+
static final int PROJECT = 1 << 2; // called 'square' in the svg spec
|
421
|
+
static final int MITER = 1 << 3;
|
422
|
+
static final int BEVEL = 1 << 5;
|
423
|
+
|
424
|
+
|
425
|
+
// lighting
|
426
|
+
|
427
|
+
static final int AMBIENT = 0;
|
428
|
+
static final int DIRECTIONAL = 1;
|
429
|
+
//static final int POINT = 2; // shared with shape feature
|
430
|
+
static final int SPOT = 3;
|
431
|
+
|
432
|
+
|
433
|
+
// key constants
|
434
|
+
|
435
|
+
// only including the most-used of these guys
|
436
|
+
// if people need more esoteric keys, they can learn about
|
437
|
+
// the esoteric java KeyEvent api and of virtual keys
|
438
|
+
|
439
|
+
// both key and keyCode will equal these values
|
440
|
+
// for 0125, these were changed to 'char' values, because they
|
441
|
+
// can be upgraded to ints automatically by Java, but having them
|
442
|
+
// as ints prevented split(blah, TAB) from working
|
443
|
+
static final char BACKSPACE = 8;
|
444
|
+
static final char TAB = 9;
|
445
|
+
static final char ENTER = 10;
|
446
|
+
static final char RETURN = 13;
|
447
|
+
static final char ESC = 27;
|
448
|
+
static final char DELETE = 127;
|
449
|
+
|
450
|
+
// i.e. if ((key == CODED) && (keyCode == UP))
|
451
|
+
static final int CODED = 0xffff;
|
452
|
+
|
453
|
+
// key will be CODED and keyCode will be this value
|
454
|
+
static final int UP = KeyEvent.VK_UP;
|
455
|
+
static final int DOWN = KeyEvent.VK_DOWN;
|
456
|
+
static final int LEFT = KeyEvent.VK_LEFT;
|
457
|
+
static final int RIGHT = KeyEvent.VK_RIGHT;
|
458
|
+
|
459
|
+
// key will be CODED and keyCode will be this value
|
460
|
+
static final int ALT = KeyEvent.VK_ALT;
|
461
|
+
static final int CONTROL = KeyEvent.VK_CONTROL;
|
462
|
+
static final int SHIFT = KeyEvent.VK_SHIFT;
|
463
|
+
|
464
|
+
|
465
|
+
// orientations (only used on Android, ignored on desktop)
|
466
|
+
|
467
|
+
/** Screen orientation constant for portrait (the hamburger way). */
|
468
|
+
static final int PORTRAIT = 1;
|
469
|
+
/** Screen orientation constant for landscape (the hot dog way). */
|
470
|
+
static final int LANDSCAPE = 2;
|
471
|
+
|
472
|
+
/** Use with fullScreen() to indicate all available displays. */
|
473
|
+
static final int SPAN = 0;
|
474
|
+
|
475
|
+
// cursor types
|
476
|
+
|
477
|
+
static final int ARROW = Cursor.DEFAULT_CURSOR;
|
478
|
+
static final int CROSS = Cursor.CROSSHAIR_CURSOR;
|
479
|
+
static final int HAND = Cursor.HAND_CURSOR;
|
480
|
+
static final int MOVE = Cursor.MOVE_CURSOR;
|
481
|
+
static final int TEXT = Cursor.TEXT_CURSOR;
|
482
|
+
static final int WAIT = Cursor.WAIT_CURSOR;
|
483
|
+
|
484
|
+
|
485
|
+
// hints - hint values are positive for the alternate version,
|
486
|
+
// negative of the same value returns to the normal/default state
|
487
|
+
|
488
|
+
@Deprecated
|
489
|
+
static final int ENABLE_NATIVE_FONTS = 1;
|
490
|
+
@Deprecated
|
491
|
+
static final int DISABLE_NATIVE_FONTS = -1;
|
492
|
+
|
493
|
+
static final int DISABLE_DEPTH_TEST = 2;
|
494
|
+
static final int ENABLE_DEPTH_TEST = -2;
|
495
|
+
|
496
|
+
static final int ENABLE_DEPTH_SORT = 3;
|
497
|
+
static final int DISABLE_DEPTH_SORT = -3;
|
498
|
+
|
499
|
+
static final int DISABLE_OPENGL_ERRORS = 4;
|
500
|
+
static final int ENABLE_OPENGL_ERRORS = -4;
|
501
|
+
|
502
|
+
static final int DISABLE_DEPTH_MASK = 5;
|
503
|
+
static final int ENABLE_DEPTH_MASK = -5;
|
504
|
+
|
505
|
+
static final int DISABLE_OPTIMIZED_STROKE = 6;
|
506
|
+
static final int ENABLE_OPTIMIZED_STROKE = -6;
|
507
|
+
|
508
|
+
static final int ENABLE_STROKE_PERSPECTIVE = 7;
|
509
|
+
static final int DISABLE_STROKE_PERSPECTIVE = -7;
|
510
|
+
|
511
|
+
static final int DISABLE_TEXTURE_MIPMAPS = 8;
|
512
|
+
static final int ENABLE_TEXTURE_MIPMAPS = -8;
|
513
|
+
|
514
|
+
static final int ENABLE_STROKE_PURE = 9;
|
515
|
+
static final int DISABLE_STROKE_PURE = -9;
|
516
|
+
|
517
|
+
static final int ENABLE_BUFFER_READING = 10;
|
518
|
+
static final int DISABLE_BUFFER_READING = -10;
|
519
|
+
|
520
|
+
static final int DISABLE_KEY_REPEAT = 11;
|
521
|
+
static final int ENABLE_KEY_REPEAT = -11;
|
522
|
+
|
523
|
+
static final int DISABLE_ASYNC_SAVEFRAME = 12;
|
524
|
+
static final int ENABLE_ASYNC_SAVEFRAME = -12;
|
525
|
+
|
526
|
+
static final int HINT_COUNT = 13;
|
1033
527
|
}
|