propane 3.11.0-java → 4.0.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.mvn/extensions.xml +1 -1
- data/CHANGELOG.md +2 -0
- data/README.md +5 -5
- data/Rakefile +1 -1
- data/lib/propane/app.rb +2 -2
- data/lib/propane/version.rb +1 -1
- data/lib/propane-4.0.0.jar +0 -0
- data/library/slider/slider.rb +1 -1
- data/pom.rb +8 -8
- data/pom.xml +8 -8
- data/propane.gemspec +3 -3
- data/src/main/java/monkstone/ColorUtil.java +1 -1
- data/src/main/java/monkstone/MathToolModule.java +1 -1
- data/src/main/java/monkstone/PropaneLibrary.java +1 -1
- data/src/main/java/monkstone/fastmath/DegLutTables.java +10 -11
- 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/LICENSE +121 -0
- 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 +92 -68
- 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 +0 -1
- data/src/main/java/processing/awt/PImageAWT.java +2 -4
- data/src/main/java/processing/core/PApplet.java +4 -4
- data/src/main/java/processing/core/PImage.java +3025 -3047
- data/src/main/java/processing/core/PMatrix.java +5 -2
- data/src/main/java/processing/data/DoubleDict.java +72 -43
- data/src/main/java/processing/data/DoubleList.java +6 -2
- data/src/main/java/processing/data/FloatDict.java +744 -756
- data/src/main/java/processing/data/FloatList.java +68 -26
- data/src/main/java/processing/data/IntDict.java +72 -45
- data/src/main/java/processing/data/IntList.java +63 -26
- data/src/main/java/processing/data/JSONArray.java +892 -931
- data/src/main/java/processing/data/JSONObject.java +1169 -1262
- data/src/main/java/processing/data/JSONTokener.java +30 -49
- data/src/main/java/processing/data/LongDict.java +699 -712
- data/src/main/java/processing/data/LongList.java +676 -700
- data/src/main/java/processing/data/Sort.java +1 -0
- data/src/main/java/processing/data/Table.java +4040 -3661
- data/src/main/java/processing/data/TableRow.java +16 -0
- data/src/main/java/processing/data/XML.java +1041 -956
- data/src/main/java/processing/event/TouchEvent.java +1 -1
- data/src/main/java/processing/opengl/FontTexture.java +2 -2
- data/src/main/java/processing/opengl/PGraphicsOpenGL.java +15 -18
- data/src/main/java/processing/opengl/PJOGL.java +2 -2
- data/src/main/java/processing/opengl/PShapeOpenGL.java +23 -24
- data/test/vecmath_spec_test.rb +14 -3
- data/vendors/Rakefile +1 -1
- metadata +9 -8
- data/lib/propane-3.11.0.jar +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
package monkstone.vecmath.vec2;
|
2
2
|
|
3
3
|
/*
|
4
|
-
* Copyright (c) 2015-
|
4
|
+
* Copyright (c) 2015-22 Martin Prout
|
5
5
|
*
|
6
6
|
* This library is free software; you can redistribute it and/or
|
7
7
|
* modify it under the terms of the GNU Lesser General Public
|
@@ -21,6 +21,7 @@ package monkstone.vecmath.vec2;
|
|
21
21
|
*
|
22
22
|
* fastAtan2 algorithm from https://github.com/libgdx/libgdx (Apache 2.0 license)
|
23
23
|
*/
|
24
|
+
import java.util.logging.Logger;
|
24
25
|
import org.jruby.Ruby;
|
25
26
|
import org.jruby.RubyArray;
|
26
27
|
import org.jruby.RubyClass;
|
@@ -44,7 +45,6 @@ public final class Vec2 extends RubyObject {
|
|
44
45
|
|
45
46
|
static final double EPSILON = 9.999999747378752e-05; // matches processing.org EPSILON
|
46
47
|
private static final long serialVersionUID = -2950154560223211646L;
|
47
|
-
|
48
48
|
private double jx = 0;
|
49
49
|
private double jy = 0;
|
50
50
|
|
@@ -91,17 +91,15 @@ public final class Vec2 extends RubyObject {
|
|
91
91
|
void init(ThreadContext context, IRubyObject... args) {
|
92
92
|
int count = args.length;
|
93
93
|
if (count == 2) {
|
94
|
-
jx =
|
95
|
-
jy =
|
94
|
+
jx = jvalue(args[0]);
|
95
|
+
jy = jvalue(args[1]);
|
96
96
|
} // allow ruby ducktyping in constructor
|
97
97
|
if (count == 1) {
|
98
98
|
if (!(args[0].respondsTo("x"))) {
|
99
99
|
throw context.runtime.newTypeError(args[0].getType() + " doesn't respond_to :x & :y");
|
100
100
|
}
|
101
|
-
jx = args[0].callMethod(context, "x")
|
102
|
-
|
103
|
-
jy = args[0].callMethod(context, "y") instanceof RubyFloat
|
104
|
-
? ((RubyFloat) args[0].callMethod(context, "y")).getValue() : ((RubyFixnum) args[0].callMethod(context, "y")).getDoubleValue();
|
101
|
+
jx = jvalue(args[0].callMethod(context, "x"));
|
102
|
+
jy = jvalue(args[0].callMethod(context, "y"));
|
105
103
|
}
|
106
104
|
}
|
107
105
|
|
@@ -137,13 +135,14 @@ public final class Vec2 extends RubyObject {
|
|
137
135
|
|
138
136
|
public IRubyObject aref(ThreadContext context, IRubyObject key) {
|
139
137
|
Ruby runtime = context.runtime;
|
140
|
-
if (key instanceof RubySymbol) {
|
141
|
-
if (
|
138
|
+
if (key instanceof RubySymbol rubySymbol) {
|
139
|
+
if (rubySymbol.equals(RubySymbol.newSymbol(runtime, "x"))) {
|
142
140
|
return runtime.newFloat(jx);
|
143
|
-
}
|
141
|
+
}
|
142
|
+
if (rubySymbol.equals(RubySymbol.newSymbol(runtime, "y"))) {
|
144
143
|
return runtime.newFloat(jy);
|
145
144
|
} else {
|
146
|
-
throw runtime.newIndexError("
|
145
|
+
throw runtime.newIndexError("unknown key");
|
147
146
|
}
|
148
147
|
} else {
|
149
148
|
throw runtime.newIndexError("invalid key");
|
@@ -160,13 +159,13 @@ public final class Vec2 extends RubyObject {
|
|
160
159
|
|
161
160
|
public IRubyObject aset(ThreadContext context, IRubyObject key, IRubyObject value) {
|
162
161
|
Ruby runtime = context.runtime;
|
163
|
-
if (key instanceof RubySymbol) {
|
164
|
-
if (
|
165
|
-
jx = value
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
162
|
+
if (key instanceof RubySymbol rubySymbol) {
|
163
|
+
if (rubySymbol.equals(RubySymbol.newSymbol(runtime, "x"))) {
|
164
|
+
jx = jvalue(value);
|
165
|
+
} else if (rubySymbol.equals(RubySymbol.newSymbol(runtime, "y"))) {
|
166
|
+
jy = jvalue(value);
|
167
|
+
} else {
|
168
|
+
throw runtime.newIndexError("unknown key");
|
170
169
|
}
|
171
170
|
} else {
|
172
171
|
throw runtime.newIndexError("invalid key");
|
@@ -183,11 +182,7 @@ public final class Vec2 extends RubyObject {
|
|
183
182
|
@JRubyMethod(name = "x=")
|
184
183
|
|
185
184
|
public IRubyObject setX(ThreadContext context, IRubyObject other) {
|
186
|
-
|
187
|
-
jx = ((RubyFloat) other).getValue();
|
188
|
-
} else {
|
189
|
-
jx = ((RubyFixnum) other).getDoubleValue();
|
190
|
-
}
|
185
|
+
jx = jvalue(other);
|
191
186
|
return other;
|
192
187
|
}
|
193
188
|
|
@@ -200,11 +195,7 @@ public final class Vec2 extends RubyObject {
|
|
200
195
|
@JRubyMethod(name = "y=")
|
201
196
|
|
202
197
|
public IRubyObject setY(ThreadContext context, IRubyObject other) {
|
203
|
-
|
204
|
-
jy = ((RubyFloat) other).getValue();
|
205
|
-
} else {
|
206
|
-
jy = ((RubyFixnum) other).getDoubleValue();
|
207
|
-
}
|
198
|
+
jy = jvalue(other);
|
208
199
|
return other;
|
209
200
|
}
|
210
201
|
|
@@ -219,28 +210,36 @@ public final class Vec2 extends RubyObject {
|
|
219
210
|
public IRubyObject dist(ThreadContext context, IRubyObject other) {
|
220
211
|
Vec2 b = null;
|
221
212
|
Ruby runtime = context.runtime;
|
222
|
-
if (other instanceof Vec2) {
|
223
|
-
b =
|
213
|
+
if (other instanceof Vec2 vec) {
|
214
|
+
b = vec.toJava(Vec2.class);
|
224
215
|
} else {
|
225
216
|
throw runtime.newTypeError("argument should be Vec2D");
|
226
217
|
}
|
227
218
|
double result = Math.hypot(jx - b.jx, jy - b.jy);
|
228
219
|
return runtime.newFloat(result);
|
229
220
|
}
|
221
|
+
|
222
|
+
@Deprecated
|
223
|
+
@JRubyMethod(name = "cross", required = 1)
|
224
|
+
public IRubyObject cross(ThreadContext context, IRubyObject other) {
|
225
|
+
Logger log = Logger.getGlobal();
|
226
|
+
log.warning("prefer ^ operator");
|
227
|
+
return op_wedge(context, other);
|
228
|
+
}
|
230
229
|
|
231
230
|
/**
|
232
231
|
*
|
233
232
|
* @param context ThreadContext
|
234
233
|
* @param other IRubyObject
|
235
|
-
* @return
|
234
|
+
* @return wedge product IRubyObject
|
236
235
|
*/
|
237
|
-
@JRubyMethod(name = "
|
236
|
+
@JRubyMethod(name = "^", required = 1)
|
238
237
|
|
239
|
-
public IRubyObject
|
238
|
+
public IRubyObject op_wedge(ThreadContext context, IRubyObject other) {
|
240
239
|
Vec2 b = null;
|
241
240
|
Ruby runtime = context.runtime;
|
242
|
-
if (other instanceof Vec2) {
|
243
|
-
b =
|
241
|
+
if (other instanceof Vec2 vec) {
|
242
|
+
b = vec.toJava(Vec2.class);
|
244
243
|
} else {
|
245
244
|
throw runtime.newTypeError("argument should be Vec2D");
|
246
245
|
}
|
@@ -258,8 +257,8 @@ public final class Vec2 extends RubyObject {
|
|
258
257
|
public IRubyObject dot(ThreadContext context, IRubyObject other) {
|
259
258
|
Vec2 b = null;
|
260
259
|
Ruby runtime = context.runtime;
|
261
|
-
if (other instanceof Vec2) {
|
262
|
-
b =
|
260
|
+
if (other instanceof Vec2 vec) {
|
261
|
+
b = vec.toJava(Vec2.class);
|
263
262
|
} else {
|
264
263
|
throw runtime.newTypeError("argument should be Vec2D");
|
265
264
|
}
|
@@ -277,8 +276,8 @@ public final class Vec2 extends RubyObject {
|
|
277
276
|
public IRubyObject op_plus(ThreadContext context, IRubyObject other) {
|
278
277
|
Vec2 b = null;
|
279
278
|
Ruby runtime = context.runtime;
|
280
|
-
if (other instanceof Vec2) {
|
281
|
-
b =
|
279
|
+
if (other instanceof Vec2 vec) {
|
280
|
+
b = vec.toJava(Vec2.class);
|
282
281
|
} else {
|
283
282
|
throw runtime.newTypeError("argument should be Vec2D");
|
284
283
|
}
|
@@ -298,8 +297,8 @@ public final class Vec2 extends RubyObject {
|
|
298
297
|
public IRubyObject op_minus(ThreadContext context, IRubyObject other) {
|
299
298
|
Vec2 b = null;
|
300
299
|
Ruby runtime = context.runtime;
|
301
|
-
if (other instanceof Vec2) {
|
302
|
-
b =
|
300
|
+
if (other instanceof Vec2 vec) {
|
301
|
+
b = vec.toJava(Vec2.class);
|
303
302
|
} else {
|
304
303
|
throw runtime.newTypeError("argument should be Vec2D");
|
305
304
|
}
|
@@ -308,6 +307,38 @@ public final class Vec2 extends RubyObject {
|
|
308
307
|
runtime.newFloat(jy - b.jy)});
|
309
308
|
}
|
310
309
|
|
310
|
+
/**
|
311
|
+
* Utility method
|
312
|
+
*
|
313
|
+
* @param obj
|
314
|
+
* @return scalar value of object or unity (preempts poss division by zero)
|
315
|
+
*/
|
316
|
+
private static double jscalar(IRubyObject obj) {
|
317
|
+
if (obj instanceof RubyFloat rubyFloat) {
|
318
|
+
return rubyFloat.getValue();
|
319
|
+
}
|
320
|
+
if (obj instanceof RubyFixnum rubyFixnum) {
|
321
|
+
return rubyFixnum.getDoubleValue();
|
322
|
+
}
|
323
|
+
return 1.0;
|
324
|
+
}
|
325
|
+
|
326
|
+
/**
|
327
|
+
* Utility method
|
328
|
+
*
|
329
|
+
* @param obj
|
330
|
+
* @return parse float value of object or zero
|
331
|
+
*/
|
332
|
+
private static double jvalue(IRubyObject obj) {
|
333
|
+
if (obj instanceof RubyFloat rubyFloat) {
|
334
|
+
return rubyFloat.getValue();
|
335
|
+
}
|
336
|
+
if (obj instanceof RubyFixnum rubyFixnum) {
|
337
|
+
return rubyFixnum.getDoubleValue();
|
338
|
+
}
|
339
|
+
return 0;
|
340
|
+
}
|
341
|
+
|
311
342
|
/**
|
312
343
|
*
|
313
344
|
* @param context ThreadContext
|
@@ -318,8 +349,7 @@ public final class Vec2 extends RubyObject {
|
|
318
349
|
|
319
350
|
public IRubyObject op_mul(ThreadContext context, IRubyObject other) {
|
320
351
|
Ruby runtime = context.runtime;
|
321
|
-
double scalar = other
|
322
|
-
? ((RubyFloat) other).getValue() : ((RubyFixnum) other).getDoubleValue();
|
352
|
+
double scalar = jscalar(other);
|
323
353
|
return Vec2.rbNew(context, this.getMetaClass(),
|
324
354
|
new IRubyObject[]{runtime.newFloat(jx * scalar),
|
325
355
|
runtime.newFloat(jy * scalar)});
|
@@ -335,8 +365,7 @@ public final class Vec2 extends RubyObject {
|
|
335
365
|
|
336
366
|
public IRubyObject op_div(ThreadContext context, IRubyObject other) {
|
337
367
|
Ruby runtime = context.runtime;
|
338
|
-
double scalar = other
|
339
|
-
? ((RubyFloat) other).getValue() : ((RubyFixnum) other).getDoubleValue();
|
368
|
+
double scalar = jscalar(other);
|
340
369
|
if (Math.abs(scalar) < Vec2.EPSILON) {
|
341
370
|
return this;
|
342
371
|
}
|
@@ -401,7 +430,7 @@ public final class Vec2 extends RubyObject {
|
|
401
430
|
public IRubyObject set_mag(ThreadContext context, IRubyObject scalar, Block block) {
|
402
431
|
double new_mag = scalar.toJava(Double.class);
|
403
432
|
if (block.isGiven() && !block.yield(context, scalar).toJava(Boolean.class)) {
|
404
|
-
return this;
|
433
|
+
return this;
|
405
434
|
}
|
406
435
|
double current = 0;
|
407
436
|
if (Math.abs(jx) > EPSILON && Math.abs(jy) > EPSILON) {
|
@@ -487,8 +516,7 @@ public final class Vec2 extends RubyObject {
|
|
487
516
|
@JRubyMethod(name = "from_angle", meta = true)
|
488
517
|
public static IRubyObject from_angle(ThreadContext context, IRubyObject klazz, IRubyObject scalar) {
|
489
518
|
Ruby runtime = context.runtime;
|
490
|
-
double angle = scalar
|
491
|
-
? ((RubyFloat) scalar).getValue() : ((RubyFixnum) scalar).getDoubleValue();
|
519
|
+
double angle = jvalue(scalar);
|
492
520
|
return Vec2.rbNew(context, klazz, new IRubyObject[]{
|
493
521
|
runtime.newFloat(Math.cos(angle)),
|
494
522
|
runtime.newFloat(Math.sin(angle))});
|
@@ -518,8 +546,7 @@ public final class Vec2 extends RubyObject {
|
|
518
546
|
*/
|
519
547
|
@JRubyMethod(name = "rotate!")
|
520
548
|
public IRubyObject rotate_bang(ThreadContext context, IRubyObject scalar) {
|
521
|
-
double theta = scalar
|
522
|
-
? ((RubyFloat) scalar).getValue() : ((RubyFixnum) scalar).getDoubleValue();
|
549
|
+
double theta = jvalue(scalar);
|
523
550
|
double x = jx * Math.cos(theta) - jy * Math.sin(theta);
|
524
551
|
double y = jx * Math.sin(theta) + jy * Math.cos(theta);
|
525
552
|
jx = x;
|
@@ -536,8 +563,7 @@ public final class Vec2 extends RubyObject {
|
|
536
563
|
@JRubyMethod(name = "rotate")
|
537
564
|
public IRubyObject rotate(ThreadContext context, IRubyObject scalar) {
|
538
565
|
Ruby runtime = context.runtime;
|
539
|
-
double theta = scalar
|
540
|
-
? ((RubyFloat) scalar).getValue() : ((RubyFixnum) scalar).getDoubleValue();
|
566
|
+
double theta = jvalue(scalar);
|
541
567
|
IRubyObject[] ary = new IRubyObject[]{
|
542
568
|
runtime.newFloat(jx * Math.cos(theta) - jy * Math.sin(theta)),
|
543
569
|
runtime.newFloat(jx * Math.sin(theta) + jy * Math.cos(theta))};
|
@@ -557,8 +583,7 @@ public final class Vec2 extends RubyObject {
|
|
557
583
|
throw runtime.newSyntaxError("Check syntax");
|
558
584
|
}
|
559
585
|
Vec2 vec = (Vec2) args[0].toJava(Vec2.class);
|
560
|
-
double scalar = args[1]
|
561
|
-
? ((RubyFloat) args[1]).getValue() : ((RubyFixnum) args[1]).getDoubleValue();
|
586
|
+
double scalar = jvalue(args[1]);
|
562
587
|
assert scalar >= 0 && scalar < 1.0 :
|
563
588
|
"Lerp value " + scalar + " out of range 0..1.0";
|
564
589
|
return Vec2.rbNew(context, this.getMetaClass(), new IRubyObject[]{
|
@@ -579,8 +604,7 @@ public final class Vec2 extends RubyObject {
|
|
579
604
|
throw runtime.newSyntaxError("Check syntax");
|
580
605
|
}
|
581
606
|
Vec2 vec = (Vec2) args[0].toJava(Vec2.class);
|
582
|
-
double scalar = args[1]
|
583
|
-
? ((RubyFloat) args[1]).getValue() : ((RubyFixnum) args[1]).getDoubleValue();
|
607
|
+
double scalar = jvalue(args[1]);
|
584
608
|
assert scalar >= 0 && scalar < 1.0 :
|
585
609
|
"Lerp value " + scalar + " out of range 0..1.0";
|
586
610
|
jx += (vec.jx - jx) * scalar;
|
@@ -599,8 +623,8 @@ public final class Vec2 extends RubyObject {
|
|
599
623
|
public IRubyObject angleBetween(ThreadContext context, IRubyObject other) {
|
600
624
|
Vec2 vec = null;
|
601
625
|
Ruby runtime = context.runtime;
|
602
|
-
if (other instanceof Vec2) {
|
603
|
-
vec =
|
626
|
+
if (other instanceof Vec2 vector) {
|
627
|
+
vec = vector.toJava(Vec2.class);
|
604
628
|
} else {
|
605
629
|
throw runtime.newTypeError("argument should be Vec2D");
|
606
630
|
}
|
@@ -618,8 +642,8 @@ public final class Vec2 extends RubyObject {
|
|
618
642
|
public IRubyObject fastAngleBetween(ThreadContext context, IRubyObject other) {
|
619
643
|
Vec2 vec = null;
|
620
644
|
Ruby runtime = context.runtime;
|
621
|
-
if (other instanceof Vec2) {
|
622
|
-
vec =
|
645
|
+
if (other instanceof Vec2 vector) {
|
646
|
+
vec = vector.toJava(Vec2.class);
|
623
647
|
} else {
|
624
648
|
throw runtime.newTypeError("argument should be Vec2D");
|
625
649
|
}
|
@@ -740,8 +764,8 @@ public final class Vec2 extends RubyObject {
|
|
740
764
|
if (obj == this) {
|
741
765
|
return true;
|
742
766
|
}
|
743
|
-
if (obj instanceof Vec2) {
|
744
|
-
final Vec2 other =
|
767
|
+
if (obj instanceof Vec2 vec2) {
|
768
|
+
final Vec2 other = vec2;
|
745
769
|
return Double.compare(jx, (Double) other.jx) == 0
|
746
770
|
&& Double.compare(jy, (Double) other.jy) == 0;
|
747
771
|
}
|
@@ -760,8 +784,8 @@ public final class Vec2 extends RubyObject {
|
|
760
784
|
if (other == this) {
|
761
785
|
return runtime.newBoolean(true);
|
762
786
|
}
|
763
|
-
if (other instanceof Vec2) {
|
764
|
-
Vec2 v =
|
787
|
+
if (other instanceof Vec2 vector) {
|
788
|
+
Vec2 v = vector.toJava(Vec2.class);
|
765
789
|
if (Double.compare(jx, (Double) v.jx) == 0
|
766
790
|
&& Double.compare(jy, (Double) v.jy) == 0) {
|
767
791
|
return runtime.newBoolean(true);
|
@@ -784,12 +808,12 @@ public final class Vec2 extends RubyObject {
|
|
784
808
|
if (other == this) {
|
785
809
|
return runtime.newBoolean(true);
|
786
810
|
}
|
787
|
-
if (other instanceof Vec2) {
|
788
|
-
Vec2 v =
|
811
|
+
if (other instanceof Vec2 vector) {
|
812
|
+
Vec2 v = vector.toJava(Vec2.class);
|
789
813
|
double diff = jx - v.jx;
|
790
814
|
if ((diff < 0 ? -diff : diff) > Vec2.EPSILON) {
|
791
815
|
return runtime.newBoolean(false);
|
792
|
-
}
|
816
|
+
}
|
793
817
|
diff = jy - v.jy;
|
794
818
|
return runtime.newBoolean((diff < 0 ? -diff : diff) < Vec2.EPSILON);
|
795
819
|
}
|
@@ -35,7 +35,6 @@ import java.io.BufferedOutputStream;
|
|
35
35
|
import java.io.File;
|
36
36
|
import java.io.IOException;
|
37
37
|
import java.util.Iterator;
|
38
|
-
|
39
38
|
import javax.imageio.IIOImage;
|
40
39
|
import javax.imageio.ImageIO;
|
41
40
|
import javax.imageio.ImageTypeSpecifier;
|
@@ -44,7 +43,6 @@ import javax.imageio.ImageWriter;
|
|
44
43
|
import javax.imageio.metadata.IIOInvalidTreeException;
|
45
44
|
import javax.imageio.metadata.IIOMetadata;
|
46
45
|
import javax.imageio.metadata.IIOMetadataNode;
|
47
|
-
|
48
46
|
import processing.core.PApplet;
|
49
47
|
import processing.core.PImage;
|
50
48
|
|
@@ -108,8 +106,8 @@ public class PImageAWT extends PImage {
|
|
108
106
|
|
109
107
|
/**
|
110
108
|
* Use the getNative() method instead, which allows library interfaces to be
|
111
|
-
* written in a cross-platform fashion for desktop, Android, and others.
|
112
|
-
*
|
109
|
+
* written in a cross-platform fashion for desktop, Android, and others.This is still included for PGraphics objects, which may need the image.
|
110
|
+
* @return
|
113
111
|
*/
|
114
112
|
public Image getImage() { // ignore
|
115
113
|
return (Image) getNative();
|
@@ -3,7 +3,7 @@
|
|
3
3
|
/*
|
4
4
|
Part of the Processing project - http://processing.org
|
5
5
|
|
6
|
-
Copyright (c) 2012-
|
6
|
+
Copyright (c) 2012-22 The Processing Foundation
|
7
7
|
Copyright (c) 2004-12 Ben Fry and Casey Reas
|
8
8
|
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
9
9
|
|
@@ -2118,7 +2118,7 @@ public class PApplet implements PConstants {
|
|
2118
2118
|
/**
|
2119
2119
|
* Create default renderer, likely to be resized, but needed for surface
|
2120
2120
|
* init.
|
2121
|
-
* @return
|
2121
|
+
* @return
|
2122
2122
|
*/
|
2123
2123
|
protected PGraphics createPrimaryGraphics() {
|
2124
2124
|
return makeGraphics(sketchWidth(), sketchHeight(),
|
@@ -2146,7 +2146,7 @@ public class PApplet implements PConstants {
|
|
2146
2146
|
* to the parent PApplet is included, which makes save() work without
|
2147
2147
|
* needing an absolute path.
|
2148
2148
|
*
|
2149
|
-
* @return
|
2149
|
+
* @return
|
2150
2150
|
* @webref image
|
2151
2151
|
* @param w width in pixels
|
2152
2152
|
* @param h height in pixels
|
@@ -3224,7 +3224,7 @@ public class PApplet implements PConstants {
|
|
3224
3224
|
*
|
3225
3225
|
* ( end auto-generated )
|
3226
3226
|
*
|
3227
|
-
* @return
|
3227
|
+
* @return
|
3228
3228
|
* @webref input:files
|
3229
3229
|
* @param args arguments to the launcher, eg. a filename.
|
3230
3230
|
* @usage Application
|