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