propane 3.5.0-java → 3.6.0-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 +1 -1
- data/.mvn/wrapper/maven-wrapper.properties +2 -2
- data/.travis.yml +1 -1
- data/CHANGELOG.md +3 -1
- data/README.md +5 -13
- data/Rakefile +1 -1
- data/lib/propane.rb +2 -1
- data/lib/propane/helper_methods.rb +0 -1
- data/lib/propane/runner.rb +2 -0
- data/lib/propane/version.rb +1 -1
- data/pom.rb +43 -43
- data/pom.xml +4 -4
- data/propane.gemspec +4 -3
- data/src/main/java/japplemenubar/JAppleMenuBar.java +3 -3
- data/src/main/java/processing/awt/PGraphicsJava2D.java +8 -17
- data/src/main/java/processing/awt/PImageAWT.java +123 -6
- data/src/main/java/processing/awt/PShapeJava2D.java +1 -0
- data/src/main/java/processing/awt/PSurfaceAWT.java +9 -7
- data/src/main/java/processing/awt/ShimAWT.java +2 -1
- data/src/main/java/processing/core/PApplet.java +4605 -6014
- data/src/main/java/processing/core/PConstants.java +5 -5
- data/src/main/java/processing/core/PFont.java +5 -17
- data/src/main/java/processing/core/PGraphics.java +308 -320
- data/src/main/java/processing/core/PImage.java +1440 -1537
- data/src/main/java/processing/core/PMatrix2D.java +24 -7
- data/src/main/java/processing/core/PMatrix3D.java +12 -5
- data/src/main/java/processing/core/PShape.java +155 -173
- data/src/main/java/processing/core/PShapeOBJ.java +2 -0
- data/src/main/java/processing/core/PShapeSVG.java +632 -611
- data/src/main/java/processing/core/PSurface.java +15 -10
- data/src/main/java/processing/core/PSurfaceNone.java +8 -4
- data/src/main/java/processing/core/PVector.java +35 -28
- data/src/main/java/processing/data/Table.java +20 -20
- data/src/main/java/processing/data/XML.java +1 -1
- data/src/main/java/processing/event/Event.java +1 -1
- data/src/main/java/processing/event/MouseEvent.java +7 -6
- data/src/main/java/processing/javafx/PGraphicsFX2D.java +20 -345
- data/src/main/java/processing/javafx/PSurfaceFX.java +127 -125
- data/src/main/java/processing/opengl/FrameBuffer.java +2 -4
- data/src/main/java/processing/opengl/LinePath.java +4 -0
- data/src/main/java/processing/opengl/LineStroker.java +2 -6
- data/src/main/java/processing/opengl/PGL.java +72 -45
- data/src/main/java/processing/opengl/PGraphicsOpenGL.java +106 -60
- data/src/main/java/processing/opengl/PJOGL.java +15 -3
- data/src/main/java/processing/opengl/PShader.java +26 -47
- data/src/main/java/processing/opengl/PShapeOpenGL.java +1041 -1001
- data/src/main/java/processing/opengl/PSurfaceJOGL.java +211 -208
- data/src/main/java/processing/opengl/Texture.java +7 -4
- data/src/main/java/processing/opengl/VertexBuffer.java +2 -2
- data/vendors/Rakefile +22 -33
- metadata +38 -18
@@ -71,12 +71,13 @@ public interface PSurface {
|
|
71
71
|
//
|
72
72
|
|
73
73
|
/**
|
74
|
-
* Get the native window object associated with this drawing surface.
|
75
|
-
* For
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
74
|
+
* Get the native window object associated with this drawing surface.For Java2D, this will be an AWT Frame object.
|
75
|
+
* For OpenGL, the window.
|
76
|
+
The data returned here is subject to the whims of the renderer,
|
77
|
+
and using this method means you're willing to deal with underlying
|
78
|
+
implementation changes and that you won't throw a fit like a toddler
|
79
|
+
if your code breaks sometime in the future.
|
80
|
+
* @return
|
80
81
|
*/
|
81
82
|
public Object getNative();
|
82
83
|
|
@@ -86,16 +87,20 @@ public interface PSurface {
|
|
86
87
|
// Silly, but prevents a lot of rewrite and extra methods for little benefit.
|
87
88
|
// However, maybe prevents us from having to document the 'frame' variable?
|
88
89
|
|
89
|
-
/** Set the window (and dock, or whatever necessary) title.
|
90
|
+
/** Set the window (and dock, or whatever necessary) title.
|
91
|
+
* @param title */
|
90
92
|
public void setTitle(String title);
|
91
93
|
|
92
|
-
/** Show or hide the window.
|
94
|
+
/** Show or hide the window.
|
95
|
+
* @param visible */
|
93
96
|
public void setVisible(boolean visible);
|
94
97
|
|
95
|
-
/** Set true if we want to resize things (default is not resizable)
|
98
|
+
/** Set true if we want to resize things (default is not resizable)
|
99
|
+
* @param resizable */
|
96
100
|
public void setResizable(boolean resizable);
|
97
101
|
|
98
|
-
/** Dumb name, but inherited from Frame and no better ideas.
|
102
|
+
/** Dumb name, but inherited from Frame and no better ideas.
|
103
|
+
* @param always */
|
99
104
|
public void setAlwaysOnTop(boolean always);
|
100
105
|
|
101
106
|
public void setIcon(PImage icon);
|
@@ -107,7 +107,8 @@ public class PSurfaceNone implements PSurface {
|
|
107
107
|
}
|
108
108
|
|
109
109
|
|
110
|
-
/** Set the window (and dock, or whatever necessary) title.
|
110
|
+
/** Set the window (and dock, or whatever necessary) title.
|
111
|
+
* @param title */
|
111
112
|
@Override
|
112
113
|
public void setTitle(String title) {
|
113
114
|
// You're in a utopian PSurface implementation where titles don't exist.
|
@@ -120,14 +121,16 @@ public class PSurfaceNone implements PSurface {
|
|
120
121
|
}
|
121
122
|
|
122
123
|
|
123
|
-
/** Show or hide the window.
|
124
|
+
/** Show or hide the window.
|
125
|
+
* @param visible */
|
124
126
|
@Override
|
125
127
|
public void setVisible(boolean visible) {
|
126
128
|
// I'm always invisible. You can't catch me.
|
127
129
|
}
|
128
130
|
|
129
131
|
|
130
|
-
/** Set true if we want to resize things (default is not resizable)
|
132
|
+
/** Set true if we want to resize things (default is not resizable)
|
133
|
+
* @param resizable */
|
131
134
|
@Override
|
132
135
|
public void setResizable(boolean resizable) {
|
133
136
|
// I don't need size to know my worth.
|
@@ -295,6 +298,7 @@ public class PSurfaceNone implements PSurface {
|
|
295
298
|
}
|
296
299
|
|
297
300
|
|
301
|
+
@Override
|
298
302
|
public void setFrameRate(float fps) {
|
299
303
|
frameRateTarget = fps;
|
300
304
|
frameRatePeriod = (long) (1000000000.0 / frameRateTarget);
|
@@ -315,7 +319,7 @@ public class PSurfaceNone implements PSurface {
|
|
315
319
|
|
316
320
|
/**
|
317
321
|
* Main method for the primary animation thread.
|
318
|
-
* <
|
322
|
+
* <A HREF="http://java.sun.com/products/jfc/tsc/articles/painting/">Painting in AWT and Swing</A>
|
319
323
|
*/
|
320
324
|
@Override
|
321
325
|
public void run() { // not good to make this synchronized, locks things up
|
@@ -23,8 +23,10 @@
|
|
23
23
|
*/
|
24
24
|
|
25
25
|
package processing.core;
|
26
|
+
|
26
27
|
import java.io.Serializable;
|
27
28
|
|
29
|
+
|
28
30
|
/**
|
29
31
|
* ( begin auto-generated from PVector.xml )
|
30
32
|
*
|
@@ -47,7 +49,7 @@ import java.io.Serializable;
|
|
47
49
|
* <a
|
48
50
|
* href="http://processing.googlecode.com/svn/trunk/processing/build/javadoc/core/">developer's reference.</a>
|
49
51
|
*
|
50
|
-
*
|
52
|
+
* ( end auto-generated )
|
51
53
|
*
|
52
54
|
* A class to describe a two or three dimensional vector.
|
53
55
|
* <p>
|
@@ -71,7 +73,7 @@ public class PVector implements Serializable {
|
|
71
73
|
* The x component of the vector. This field (variable) can be used to both
|
72
74
|
* get and set the value (see above example.)
|
73
75
|
*
|
74
|
-
*
|
76
|
+
* ( end auto-generated )
|
75
77
|
*
|
76
78
|
* @webref pvector:field
|
77
79
|
* @usage web_application
|
@@ -85,7 +87,7 @@ public class PVector implements Serializable {
|
|
85
87
|
* The y component of the vector. This field (variable) can be used to both
|
86
88
|
* get and set the value (see above example.)
|
87
89
|
*
|
88
|
-
*
|
90
|
+
* ( end auto-generated )
|
89
91
|
*
|
90
92
|
* @webref pvector:field
|
91
93
|
* @usage web_application
|
@@ -99,7 +101,7 @@ public class PVector implements Serializable {
|
|
99
101
|
* The z component of the vector. This field (variable) can be used to both
|
100
102
|
* get and set the value (see above example.)
|
101
103
|
*
|
102
|
-
*
|
104
|
+
* ( end auto-generated )
|
103
105
|
*
|
104
106
|
* @webref pvector:field
|
105
107
|
* @usage web_application
|
@@ -147,7 +149,7 @@ public class PVector implements Serializable {
|
|
147
149
|
* Sets the x, y, and z component of the vector using two or three separate
|
148
150
|
* variables, the data from a PVector, or the values from a float array.
|
149
151
|
*
|
150
|
-
*
|
152
|
+
* ( end auto-generated )
|
151
153
|
*
|
152
154
|
* @webref pvector:method
|
153
155
|
* @param x the x component of the vector
|
@@ -325,7 +327,7 @@ public class PVector implements Serializable {
|
|
325
327
|
*
|
326
328
|
* Make a new 2D unit vector from an angle.
|
327
329
|
*
|
328
|
-
*
|
330
|
+
* ( end auto-generated )
|
329
331
|
*
|
330
332
|
* @webref pvector:method
|
331
333
|
* @usage web_application
|
@@ -359,7 +361,7 @@ public class PVector implements Serializable {
|
|
359
361
|
*
|
360
362
|
* Gets a copy of the vector, returns a PVector object.
|
361
363
|
*
|
362
|
-
*
|
364
|
+
* ( end auto-generated )
|
363
365
|
*
|
364
366
|
* @webref pvector:method
|
365
367
|
* @usage web_application
|
@@ -400,7 +402,7 @@ public class PVector implements Serializable {
|
|
400
402
|
* Calculates the magnitude (length) of the vector and returns the result
|
401
403
|
* as a float (this is simply the equation <em>sqrt(x*x + y*y + z*z)</em>.)
|
402
404
|
*
|
403
|
-
*
|
405
|
+
* ( end auto-generated )
|
404
406
|
*
|
405
407
|
* @webref pvector:method
|
406
408
|
* @usage web_application
|
@@ -421,7 +423,7 @@ public class PVector implements Serializable {
|
|
421
423
|
* Faster if the real length is not required in the
|
422
424
|
* case of comparing vectors, etc.
|
423
425
|
*
|
424
|
-
*
|
426
|
+
* ( end auto-generated )
|
425
427
|
*
|
426
428
|
* @webref pvector:method
|
427
429
|
* @usage web_application
|
@@ -443,7 +445,7 @@ public class PVector implements Serializable {
|
|
443
445
|
* others have no return value -- they act directly on the vector. See the
|
444
446
|
* examples for more context.
|
445
447
|
*
|
446
|
-
*
|
448
|
+
* ( end auto-generated )
|
447
449
|
*
|
448
450
|
* @webref pvector:method
|
449
451
|
* @usage web_application
|
@@ -513,7 +515,7 @@ public class PVector implements Serializable {
|
|
513
515
|
* PVector, the others have no return value -- they act directly on the
|
514
516
|
* vector. See the examples for more context.
|
515
517
|
*
|
516
|
-
*
|
518
|
+
* ( end auto-generated )
|
517
519
|
*
|
518
520
|
* @webref pvector:method
|
519
521
|
* @usage web_application
|
@@ -579,7 +581,7 @@ public class PVector implements Serializable {
|
|
579
581
|
*
|
580
582
|
* Multiplies a vector by a scalar or multiplies one vector by another.
|
581
583
|
*
|
582
|
-
*
|
584
|
+
* ( end auto-generated )
|
583
585
|
*
|
584
586
|
* @webref pvector:method
|
585
587
|
* @usage web_application
|
@@ -621,7 +623,7 @@ public class PVector implements Serializable {
|
|
621
623
|
*
|
622
624
|
* Divides a vector by a scalar or divides one vector by another.
|
623
625
|
*
|
624
|
-
*
|
626
|
+
* ( end auto-generated )
|
625
627
|
*
|
626
628
|
* @webref pvector:method
|
627
629
|
* @usage web_application
|
@@ -666,7 +668,7 @@ public class PVector implements Serializable {
|
|
666
668
|
* Calculates the Euclidean distance between two points (considering a
|
667
669
|
* point as a vector object).
|
668
670
|
*
|
669
|
-
*
|
671
|
+
* ( end auto-generated )
|
670
672
|
*
|
671
673
|
* @webref pvector:method
|
672
674
|
* @usage web_application
|
@@ -699,7 +701,7 @@ public class PVector implements Serializable {
|
|
699
701
|
*
|
700
702
|
* Calculates the dot product of two vectors.
|
701
703
|
*
|
702
|
-
*
|
704
|
+
* ( end auto-generated )
|
703
705
|
*
|
704
706
|
* @webref pvector:method
|
705
707
|
* @usage web_application
|
@@ -737,7 +739,7 @@ public class PVector implements Serializable {
|
|
737
739
|
* Calculates and returns a vector composed of the cross product between
|
738
740
|
* two vectors.
|
739
741
|
*
|
740
|
-
*
|
742
|
+
* ( end auto-generated )
|
741
743
|
*
|
742
744
|
* @webref pvector:method
|
743
745
|
* @param v the vector to calculate the cross product
|
@@ -790,7 +792,7 @@ public class PVector implements Serializable {
|
|
790
792
|
*
|
791
793
|
* Normalize the vector to length 1 (make it a unit vector).
|
792
794
|
*
|
793
|
-
*
|
795
|
+
* ( end auto-generated )
|
794
796
|
*
|
795
797
|
* @webref pvector:method
|
796
798
|
* @usage web_application
|
@@ -828,7 +830,7 @@ public class PVector implements Serializable {
|
|
828
830
|
*
|
829
831
|
* Limit the magnitude of this vector to the value used for the <b>max</b> parameter.
|
830
832
|
*
|
831
|
-
*
|
833
|
+
* ( end auto-generated )
|
832
834
|
*
|
833
835
|
* @webref pvector:method
|
834
836
|
* @usage web_application
|
@@ -849,7 +851,7 @@ public class PVector implements Serializable {
|
|
849
851
|
*
|
850
852
|
* Set the magnitude of this vector to the value used for the <b>len</b> parameter.
|
851
853
|
*
|
852
|
-
*
|
854
|
+
* ( end auto-generated )
|
853
855
|
*
|
854
856
|
* @webref pvector:method
|
855
857
|
* @usage web_application
|
@@ -881,7 +883,7 @@ public class PVector implements Serializable {
|
|
881
883
|
*
|
882
884
|
* Calculate the angle of rotation for this vector (only 2D vectors)
|
883
885
|
*
|
884
|
-
*
|
886
|
+
* ( end auto-generated )
|
885
887
|
*
|
886
888
|
* @webref pvector:method
|
887
889
|
* @usage web_application
|
@@ -905,7 +907,7 @@ public class PVector implements Serializable {
|
|
905
907
|
*
|
906
908
|
* Rotate the vector by an angle (only 2D vectors), magnitude remains the same
|
907
909
|
*
|
908
|
-
*
|
910
|
+
* ( end auto-generated )
|
909
911
|
*
|
910
912
|
* @webref pvector:method
|
911
913
|
* @usage web_application
|
@@ -926,7 +928,7 @@ public class PVector implements Serializable {
|
|
926
928
|
*
|
927
929
|
* Linear interpolate the vector to another vector
|
928
930
|
*
|
929
|
-
*
|
931
|
+
* ( end auto-generated )
|
930
932
|
*
|
931
933
|
* @webref pvector:method
|
932
934
|
* @usage web_application
|
@@ -947,6 +949,8 @@ public class PVector implements Serializable {
|
|
947
949
|
* Linear interpolate between two vectors (returns a new PVector object)
|
948
950
|
* @param v1 the vector to start from
|
949
951
|
* @param v2 the vector to lerp to
|
952
|
+
* @param amt
|
953
|
+
* @return
|
950
954
|
*/
|
951
955
|
public static PVector lerp(PVector v1, PVector v2, float amt) {
|
952
956
|
PVector v = v1.copy();
|
@@ -960,6 +964,8 @@ public class PVector implements Serializable {
|
|
960
964
|
* @param x the x component to lerp to
|
961
965
|
* @param y the y component to lerp to
|
962
966
|
* @param z the z component to lerp to
|
967
|
+
* @param amt
|
968
|
+
* @return
|
963
969
|
*/
|
964
970
|
public PVector lerp(float x, float y, float z, float amt) {
|
965
971
|
this.x = PApplet.lerp(this.x, x, amt);
|
@@ -972,10 +978,10 @@ public class PVector implements Serializable {
|
|
972
978
|
/**
|
973
979
|
* ( begin auto-generated from PVector_angleBetween.xml )
|
974
980
|
*
|
975
|
-
* Calculates and returns the angle (in radians) between two vectors.
|
981
|
+
* Calculates and returns the angle (in radians) between two vectors.( end auto-generated )
|
976
982
|
*
|
977
|
-
*
|
978
983
|
*
|
984
|
+
* @return
|
979
985
|
* @webref pvector:method
|
980
986
|
* @usage web_application
|
981
987
|
* @param v1 the x, y, and z components of a PVector
|
@@ -1017,12 +1023,13 @@ public class PVector implements Serializable {
|
|
1017
1023
|
/**
|
1018
1024
|
* ( begin auto-generated from PVector_array.xml )
|
1019
1025
|
*
|
1020
|
-
* Return a representation of this vector as a float array.
|
1021
|
-
|
1022
|
-
|
1026
|
+
* Return a representation of this vector as a float array.This is only
|
1027
|
+
for temporary use. If used in any other fashion, the contents should be
|
1028
|
+
copied by using the <b>PVector.get()</b> method to copy into your own array.
|
1023
1029
|
*
|
1024
|
-
*
|
1030
|
+
* ( end auto-generated )
|
1025
1031
|
*
|
1032
|
+
* @return
|
1026
1033
|
* @webref pvector:method
|
1027
1034
|
* @usage: web_application
|
1028
1035
|
* @brief Return a representation of the vector as a float array
|
@@ -437,7 +437,7 @@ public class Table {
|
|
437
437
|
// Sleep this thread so that the GC can catch up
|
438
438
|
Thread.sleep(10);
|
439
439
|
} catch (InterruptedException e) {
|
440
|
-
|
440
|
+
e.printStackTrace();
|
441
441
|
}
|
442
442
|
}
|
443
443
|
}
|
@@ -835,7 +835,7 @@ public class Table {
|
|
835
835
|
}
|
836
836
|
}
|
837
837
|
} catch (IOException e) {
|
838
|
-
|
838
|
+
e.printStackTrace();
|
839
839
|
}
|
840
840
|
return null;
|
841
841
|
}
|
@@ -873,13 +873,13 @@ public class Table {
|
|
873
873
|
}
|
874
874
|
}
|
875
875
|
} catch (UnsupportedEncodingException e) {
|
876
|
-
|
876
|
+
e.printStackTrace();
|
877
877
|
} catch (IOException e) {
|
878
|
-
|
878
|
+
e.printStackTrace();
|
879
879
|
} catch (ParserConfigurationException e) {
|
880
|
-
|
880
|
+
e.printStackTrace();
|
881
881
|
} catch (SAXException e) {
|
882
|
-
|
882
|
+
e.printStackTrace();
|
883
883
|
}
|
884
884
|
}
|
885
885
|
|
@@ -1047,9 +1047,9 @@ public class Table {
|
|
1047
1047
|
outgoing = Array.newInstance(target, getRowCount());
|
1048
1048
|
}
|
1049
1049
|
} catch (NoSuchFieldException e) {
|
1050
|
-
|
1050
|
+
e.printStackTrace();
|
1051
1051
|
} catch (SecurityException e) {
|
1052
|
-
|
1052
|
+
e.printStackTrace();
|
1053
1053
|
}
|
1054
1054
|
|
1055
1055
|
// Object enclosingObject = sketch;
|
@@ -1070,9 +1070,9 @@ public class Table {
|
|
1070
1070
|
con.setAccessible(true);
|
1071
1071
|
}
|
1072
1072
|
} catch (SecurityException e) {
|
1073
|
-
|
1073
|
+
e.printStackTrace();
|
1074
1074
|
} catch (NoSuchMethodException e) {
|
1075
|
-
|
1075
|
+
e.printStackTrace();
|
1076
1076
|
}
|
1077
1077
|
|
1078
1078
|
Field[] fields = target.getDeclaredFields();
|
@@ -1166,13 +1166,13 @@ public class Table {
|
|
1166
1166
|
targetField.set(enclosingObject, outgoing);
|
1167
1167
|
|
1168
1168
|
} catch (InstantiationException e) {
|
1169
|
-
|
1169
|
+
e.printStackTrace();
|
1170
1170
|
} catch (IllegalAccessException e) {
|
1171
|
-
|
1171
|
+
e.printStackTrace();
|
1172
1172
|
} catch (IllegalArgumentException e) {
|
1173
|
-
|
1173
|
+
e.printStackTrace();
|
1174
1174
|
} catch (InvocationTargetException e) {
|
1175
|
-
|
1175
|
+
e.printStackTrace();
|
1176
1176
|
}
|
1177
1177
|
}
|
1178
1178
|
|
@@ -1213,7 +1213,7 @@ public class Table {
|
|
1213
1213
|
try {
|
1214
1214
|
saveODS(output);
|
1215
1215
|
} catch (IOException e) {
|
1216
|
-
|
1216
|
+
e.printStackTrace();
|
1217
1217
|
return false;
|
1218
1218
|
}
|
1219
1219
|
} else if (extension.equals("html")) {
|
@@ -1222,7 +1222,7 @@ public class Table {
|
|
1222
1222
|
try {
|
1223
1223
|
saveBinary(output);
|
1224
1224
|
} catch (IOException e) {
|
1225
|
-
|
1225
|
+
e.printStackTrace();
|
1226
1226
|
return false;
|
1227
1227
|
}
|
1228
1228
|
}
|
@@ -2300,7 +2300,7 @@ public class Table {
|
|
2300
2300
|
try {
|
2301
2301
|
Thread.sleep(10); // gc time!
|
2302
2302
|
} catch (InterruptedException e) {
|
2303
|
-
|
2303
|
+
e.printStackTrace();
|
2304
2304
|
}
|
2305
2305
|
}
|
2306
2306
|
}
|
@@ -3021,7 +3021,7 @@ public class Table {
|
|
3021
3021
|
try {
|
3022
3022
|
return rs.getMetaData().getColumnCount();
|
3023
3023
|
} catch (SQLException e) {
|
3024
|
-
|
3024
|
+
e.printStackTrace();
|
3025
3025
|
return -1;
|
3026
3026
|
}
|
3027
3027
|
}
|
@@ -3434,7 +3434,7 @@ public class Table {
|
|
3434
3434
|
// try {
|
3435
3435
|
// return excelDateFormat.parse(timestamp).getTime();
|
3436
3436
|
// } catch (ParseException e) {
|
3437
|
-
//
|
3437
|
+
// e.printStackTrace();
|
3438
3438
|
// return -1;
|
3439
3439
|
// }
|
3440
3440
|
// }
|
@@ -4778,7 +4778,7 @@ public class Table {
|
|
4778
4778
|
// try {
|
4779
4779
|
// Thread.sleep(5);
|
4780
4780
|
// } catch (InterruptedException e) {
|
4781
|
-
//
|
4781
|
+
// e.printStackTrace();
|
4782
4782
|
// }
|
4783
4783
|
}
|
4784
4784
|
}
|