propane 3.9.0-java → 3.10.0-java

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