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