picrate 0.7.0-java → 0.8.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/.mvn/wrapper/MavenWrapperDownloader.java +117 -0
  4. data/.mvn/wrapper/maven-wrapper.properties +2 -1
  5. data/.travis.yml +2 -5
  6. data/CHANGELOG.md +4 -0
  7. data/README.md +3 -3
  8. data/Rakefile +15 -27
  9. data/docs/_config.yml +1 -1
  10. data/docs/_posts/2018-05-11-arch-linux-arm.md +1 -1
  11. data/docs/_posts/2018-11-18-building-gem.md +1 -1
  12. data/lib/picrate/app.rb +1 -1
  13. data/lib/picrate/native_folder.rb +1 -1
  14. data/lib/picrate/version.rb +1 -1
  15. data/mvnw +127 -51
  16. data/mvnw.cmd +182 -0
  17. data/pom.rb +39 -30
  18. data/pom.xml +50 -37
  19. data/src/main/java/monkstone/ColorUtil.java +1 -1
  20. data/src/main/java/monkstone/core/LibraryProxy.java +0 -1
  21. data/src/main/java/monkstone/noise/SimplexNoise.java +1 -1
  22. data/src/main/java/monkstone/vecmath/GfxRender.java +87 -0
  23. data/src/main/java/monkstone/vecmath/ShapeRender.java +1 -1
  24. data/src/main/java/monkstone/vecmath/vec2/Vec2.java +1 -1
  25. data/src/main/java/processing/awt/PGraphicsJava2D.java +48 -50
  26. data/src/main/java/processing/awt/PShapeJava2D.java +10 -0
  27. data/src/main/java/processing/awt/PSurfaceAWT.java +315 -371
  28. data/src/main/java/processing/core/PApplet.java +15424 -15495
  29. data/src/main/java/processing/core/PConstants.java +4 -4
  30. data/src/main/java/processing/core/PFont.java +394 -369
  31. data/src/main/java/processing/core/PGraphics.java +11 -10
  32. data/src/main/java/processing/core/PImage.java +1389 -1435
  33. data/src/main/java/processing/core/PMatrix2D.java +297 -294
  34. data/src/main/java/processing/core/PMatrix3D.java +641 -594
  35. data/src/main/java/processing/core/PShape.java +1755 -1784
  36. data/src/main/java/processing/core/PShapeOBJ.java +145 -133
  37. data/src/main/java/processing/core/PShapeSVG.java +808 -801
  38. data/src/main/java/processing/core/PStyle.java +141 -149
  39. data/src/main/java/processing/core/PSurface.java +111 -117
  40. data/src/main/java/processing/core/PSurfaceNone.java +178 -187
  41. data/src/main/java/processing/javafx/PGraphicsFX2D.java +349 -346
  42. data/src/main/java/processing/opengl/FontTexture.java +40 -59
  43. data/src/main/java/processing/opengl/FrameBuffer.java +28 -18
  44. data/src/main/java/processing/opengl/LinePath.java +7 -7
  45. data/src/main/java/processing/opengl/LineStroker.java +6 -10
  46. data/src/main/java/processing/opengl/PGL.java +56 -44
  47. data/src/main/java/processing/opengl/PGraphicsOpenGL.java +909 -2338
  48. data/src/main/java/processing/opengl/PJOGL.java +1722 -1763
  49. data/src/main/java/processing/opengl/PShader.java +1308 -1192
  50. data/src/main/java/processing/opengl/PShapeOpenGL.java +487 -1811
  51. data/src/main/java/processing/opengl/PSurfaceJOGL.java +482 -497
  52. data/src/main/java/processing/opengl/Texture.java +99 -76
  53. data/src/main/java/processing/opengl/VertexBuffer.java +41 -43
  54. data/vendors/Rakefile +1 -1
  55. metadata +7 -4
@@ -1,6 +1,6 @@
1
1
  /* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
2
 
3
- /*
3
+ /*
4
4
  Part of the Processing project - http://processing.org
5
5
 
6
6
  Copyright (c) 2008 Ben Fry and Casey Reas
@@ -19,8 +19,7 @@
19
19
  Public License along with this library; if not, write to the
20
20
  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
21
21
  Boston, MA 02111-1307 USA
22
- */
23
-
22
+ */
24
23
  package processing.core;
25
24
 
26
25
  /**
@@ -29,180 +28,173 @@ package processing.core;
29
28
  */
30
29
  public class PStyle implements PConstants {
31
30
 
32
- /**
33
- *
34
- */
35
- public int imageMode;
36
-
37
- /**
38
- *
39
- */
40
- public int rectMode;
41
-
42
- /**
43
- *
44
- */
45
- public int ellipseMode;
46
-
47
- /**
48
- *
49
- */
50
- public int shapeMode;
51
-
52
- /**
53
- *
54
- */
55
- public int blendMode;
56
-
57
- /**
58
- *
59
- */
60
- public int colorMode;
61
-
62
- /**
63
- *
64
- */
65
- public float colorModeX;
66
-
67
- /**
68
- *
69
- */
70
- public float colorModeY;
71
-
72
- /**
73
- *
74
- */
75
- public float colorModeZ;
76
-
77
- /**
78
- *
79
- */
80
- public float colorModeA;
81
-
82
- /**
83
- *
84
- */
85
- public boolean tint;
86
-
87
- /**
88
- *
89
- */
90
- public int tintColor;
91
-
92
- /**
93
- *
94
- */
95
- public boolean fill;
96
-
97
- /**
98
- *
99
- */
100
- public int fillColor;
101
-
102
- /**
103
- *
104
- */
105
- public boolean stroke;
106
-
107
- /**
108
- *
109
- */
110
- public int strokeColor;
111
-
112
- /**
113
- *
114
- */
115
- public float strokeWeight;
116
-
117
- /**
118
- *
119
- */
120
- public int strokeCap;
121
-
122
- /**
123
- *
124
- */
125
- public int strokeJoin;
31
+ /**
32
+ *
33
+ */
34
+ public int imageMode;
35
+
36
+ /**
37
+ *
38
+ */
39
+ public int rectMode;
40
+
41
+ /**
42
+ *
43
+ */
44
+ public int ellipseMode;
45
+
46
+ /**
47
+ *
48
+ */
49
+ public int shapeMode;
50
+
51
+ /**
52
+ *
53
+ */
54
+ public int blendMode;
55
+
56
+ /**
57
+ *
58
+ */
59
+ public int colorMode;
60
+
61
+ /**
62
+ *
63
+ */
64
+ public float colorModeX;
65
+
66
+ /**
67
+ *
68
+ */
69
+ public float colorModeY;
70
+
71
+ /**
72
+ *
73
+ */
74
+ public float colorModeZ;
75
+
76
+ /**
77
+ *
78
+ */
79
+ public float colorModeA;
80
+
81
+ /**
82
+ *
83
+ */
84
+ public boolean tint;
85
+
86
+ /**
87
+ *
88
+ */
89
+ public int tintColor;
90
+
91
+ /**
92
+ *
93
+ */
94
+ public boolean fill;
95
+
96
+ /**
97
+ *
98
+ */
99
+ public int fillColor;
100
+
101
+ /**
102
+ *
103
+ */
104
+ public boolean stroke;
105
+
106
+ /**
107
+ *
108
+ */
109
+ public int strokeColor;
110
+
111
+ /**
112
+ *
113
+ */
114
+ public float strokeWeight;
115
+
116
+ /**
117
+ *
118
+ */
119
+ public int strokeCap;
120
+
121
+ /**
122
+ *
123
+ */
124
+ public int strokeJoin;
126
125
 
127
126
  // TODO these fellas are inconsistent, and may need to go elsewhere
128
-
129
- /**
130
- *
131
- */
127
+ /**
128
+ *
129
+ */
132
130
  public float ambientR,
133
-
134
131
  /**
135
132
  *
136
133
  */
137
134
  ambientG,
138
-
139
135
  /**
140
136
  *
141
137
  */
142
138
  ambientB;
143
139
 
144
- /**
145
- *
146
- */
147
- public float specularR,
148
-
140
+ /**
141
+ *
142
+ */
143
+ public float specularR,
149
144
  /**
150
145
  *
151
146
  */
152
147
  specularG,
153
-
154
148
  /**
155
149
  *
156
150
  */
157
151
  specularB;
158
152
 
159
- /**
160
- *
161
- */
162
- public float emissiveR,
163
-
153
+ /**
154
+ *
155
+ */
156
+ public float emissiveR,
164
157
  /**
165
158
  *
166
159
  */
167
160
  emissiveG,
168
-
169
161
  /**
170
162
  *
171
163
  */
172
164
  emissiveB;
173
165
 
174
- /**
175
- *
176
- */
177
- public float shininess;
178
-
179
- /**
180
- *
181
- */
182
- public PFont textFont;
183
-
184
- /**
185
- *
186
- */
187
- public int textAlign;
188
-
189
- /**
190
- *
191
- */
192
- public int textAlignY;
193
-
194
- /**
195
- *
196
- */
197
- public int textMode;
198
-
199
- /**
200
- *
201
- */
202
- public float textSize;
203
-
204
- /**
205
- *
206
- */
207
- public float textLeading;
166
+ /**
167
+ *
168
+ */
169
+ public float shininess;
170
+
171
+ /**
172
+ *
173
+ */
174
+ public PFont textFont;
175
+
176
+ /**
177
+ *
178
+ */
179
+ public int textAlign;
180
+
181
+ /**
182
+ *
183
+ */
184
+ public int textAlignY;
185
+
186
+ /**
187
+ *
188
+ */
189
+ public int textMode;
190
+
191
+ /**
192
+ *
193
+ */
194
+ public float textSize;
195
+
196
+ /**
197
+ *
198
+ */
199
+ public float textLeading;
208
200
  }
@@ -1,6 +1,6 @@
1
1
  /* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
2
 
3
- /*
3
+ /*
4
4
  Part of the Processing project - http://processing.org
5
5
 
6
6
  Copyright (c) 2014-15 The Processing Foundation
@@ -18,8 +18,7 @@
18
18
  Public License along with this library; if not, write to the
19
19
  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20
20
  Boston, MA 02111-1307 USA
21
- */
22
-
21
+ */
23
22
  package processing.core;
24
23
 
25
24
  /**
@@ -27,127 +26,128 @@ package processing.core;
27
26
  * @author Martin Prout
28
27
  */
29
28
  public interface PSurface {
29
+
30
30
  /**
31
31
  * Minimum dimensions for the window holding an applet. This varies between
32
- * platforms, Mac OS X 10.3 (confirmed with 10.7 and Java 6) can do any
33
- * height but requires at least 128 pixels width. Windows XP has another
34
- * set of limitations. And for all I know, Linux probably allows window
35
- * sizes to be negative numbers.
32
+ * platforms, Mac OS X 10.3 (confirmed with 10.7 and Java 6) can do any height
33
+ * but requires at least 128 pixels width. Windows XP has another set of
34
+ * limitations. And for all I know, Linux probably allows window sizes to be
35
+ * negative numbers.
36
36
  */
37
37
  static public final int MIN_WINDOW_WIDTH = 128;
38
38
 
39
- /**
40
- *
41
- */
42
- static public final int MIN_WINDOW_HEIGHT = 128;
39
+ /**
40
+ *
41
+ */
42
+ static public final int MIN_WINDOW_HEIGHT = 128;
43
43
 
44
44
  // renderer that doesn't draw to the screen
45
-
46
- /**
47
- *
48
- * @param sketch
49
- */
45
+ /**
46
+ *
47
+ * @param sketch
48
+ */
50
49
  public void initOffscreen(PApplet sketch);
51
50
 
52
51
  // considering removal in favor of separate Component classes for appropriate renderers
53
52
  // (i.e. for Java2D or a generic Image surface, but not PDF, debatable for GL or FX)
54
53
  //public Component initComponent(PApplet sketch);
55
-
56
54
  //public Frame initFrame(PApplet sketch, Color backgroundColor,
57
55
  // public void initFrame(PApplet sketch, int backgroundColor,
58
56
  // int deviceIndex, boolean fullScreen, boolean spanDisplays);
59
-
60
- /**
61
- *
62
- * @param sketch
63
- */
57
+ /**
58
+ *
59
+ * @param sketch
60
+ */
64
61
  public void initFrame(PApplet sketch);
65
62
 
66
63
  /**
67
- * Get the native window object associated with this drawing surface.
68
- * For Java2D, this will be an AWT Frame object. For OpenGL, the window.
69
- * The data returned here is subject to the whims of the renderer,
70
- * and using this method means you're willing to deal with underlying
71
- * implementation changes and that you won't throw a fit like a toddler
72
- * if your code breaks sometime in the future.
73
- * @return
64
+ * Get the native window object associated with this drawing surface. For
65
+ * Java2D, this will be an AWT Frame object. For OpenGL, the window. The data
66
+ * returned here is subject to the whims of the renderer, and using this
67
+ * method means you're willing to deal with underlying implementation changes
68
+ * and that you won't throw a fit like a toddler if your code breaks sometime
69
+ * in the future.
70
+ *
71
+ * @return
74
72
  */
75
73
  public Object getNative();
76
74
 
77
75
  //
78
-
79
76
  // Just call these on an AWT Frame object stored in PApplet.
80
77
  // Silly, but prevents a lot of rewrite and extra methods for little benefit.
81
78
  // However, maybe prevents us from having to document the 'frame' variable?
82
-
83
- /** Set the window (and dock, or whatever necessary) title.
84
- * @param title */
79
+ /**
80
+ * Set the window (and dock, or whatever necessary) title.
81
+ *
82
+ * @param title
83
+ */
85
84
  public void setTitle(String title);
86
85
 
87
- /** Show or hide the window.
88
- * @param visible */
86
+ /**
87
+ * Show or hide the window.
88
+ *
89
+ * @param visible
90
+ */
89
91
  public void setVisible(boolean visible);
90
92
 
91
- /** Set true if we want to resize things (default is not resizable)
92
- * @param resizable */
93
+ /**
94
+ * Set true if we want to resize things (default is not resizable)
95
+ *
96
+ * @param resizable
97
+ */
93
98
  public void setResizable(boolean resizable);
94
99
 
95
- /** Dumb name, but inherited from Frame and no better ideas.
96
- * @param always */
100
+ /**
101
+ * Dumb name, but inherited from Frame and no better ideas.
102
+ *
103
+ * @param always
104
+ */
97
105
  public void setAlwaysOnTop(boolean always);
98
106
 
99
- /**
100
- *
101
- * @param icon
102
- */
103
- public void setIcon(PImage icon);
107
+ /**
108
+ *
109
+ * @param icon
110
+ */
111
+ public void setIcon(PImage icon);
104
112
 
105
113
  //
106
-
107
114
  // public void placeWindow(int[] location);
108
-
109
- /**
110
- *
111
- * @param location
112
- * @param editorLocation
113
- */
114
-
115
+ /**
116
+ *
117
+ * @param location
118
+ * @param editorLocation
119
+ */
115
120
  public void placeWindow(int[] location, int[] editorLocation);
116
121
 
117
122
  //public void placeFullScreen(boolean hideStop);
118
-
119
- /**
120
- *
121
- * @param stopColor
122
- */
123
+ /**
124
+ *
125
+ * @param stopColor
126
+ */
123
127
  public void placePresent(int stopColor);
124
128
 
125
129
  // Sketch is running from the PDE, set up messaging back to the PDE
126
-
127
- /**
128
- *
129
- */
130
+ /**
131
+ *
132
+ */
130
133
  public void setupExternalMessages();
131
134
 
132
135
  //
133
-
134
136
  // sets displayWidth/Height inside PApplet
135
137
  //public void checkDisplaySize();
136
-
137
- /**
138
- *
139
- * @param x
140
- * @param y
141
- */
142
-
138
+ /**
139
+ *
140
+ * @param x
141
+ * @param y
142
+ */
143
143
  public void setLocation(int x, int y);
144
144
 
145
- /**
146
- *
147
- * @param width
148
- * @param height
149
- */
150
- public void setSize(int width, int height);
145
+ /**
146
+ *
147
+ * @param width
148
+ * @param height
149
+ */
150
+ public void setSize(int width, int height);
151
151
 
152
152
  // /**
153
153
  // * Called by {@link PApplet#createGraphics} to initialize the
@@ -161,59 +161,52 @@ public interface PSurface {
161
161
  //public void initImage(PGraphics gr, int wide, int high);
162
162
  // create pixel buffer, called from allocate() to produce a compatible image for rendering efficiently
163
163
  // public void initImage(PGraphics gr);
164
-
165
164
  //public Component getComponent();
166
-
167
165
  // /**
168
166
  // * Sometimes smoothing must be set at the drawing surface level
169
167
  // * not just inside the renderer itself.
170
168
  // */
171
169
  // public void setSmooth(int level);
172
-
173
- /**
174
- *
175
- * @param fps
176
- */
177
-
170
+ /**
171
+ *
172
+ * @param fps
173
+ */
178
174
  public void setFrameRate(float fps);
179
175
 
180
176
  // // called on the first frame so that the now-visible drawing surface can
181
177
  // // receive key and mouse events
182
178
  // public void requestFocus();
183
-
184
179
  // // finish rendering to the screen (called by PApplet)
185
180
  // public void blit();
186
-
187
181
  //
188
-
189
- /**
190
- *
191
- * @param kind
192
- */
193
-
182
+ /**
183
+ *
184
+ * @param kind
185
+ */
194
186
  public void setCursor(int kind);
195
187
 
196
- /**
197
- *
198
- * @param image
199
- * @param hotspotX
200
- * @param hotspotY
201
- */
202
- public void setCursor(PImage image, int hotspotX, int hotspotY);
188
+ /**
189
+ *
190
+ * @param image
191
+ * @param hotspotX
192
+ * @param hotspotY
193
+ */
194
+ public void setCursor(PImage image, int hotspotX, int hotspotY);
203
195
 
204
- /**
205
- *
206
- */
207
- public void showCursor();
196
+ /**
197
+ *
198
+ */
199
+ public void showCursor();
208
200
 
209
- /**
210
- *
211
- */
212
- public void hideCursor();
201
+ /**
202
+ *
203
+ */
204
+ public void hideCursor();
213
205
 
214
206
  //
215
-
216
- /** Start the animation thread */
207
+ /**
208
+ * Start the animation thread
209
+ */
217
210
  public void startThread();
218
211
 
219
212
  /**
@@ -223,20 +216,21 @@ public interface PSurface {
223
216
  */
224
217
  public void pauseThread();
225
218
 
226
- /**
227
- *
228
- */
229
- public void resumeThread();
219
+ /**
220
+ *
221
+ */
222
+ public void resumeThread();
230
223
 
231
224
  /**
232
225
  * Stop the animation thread (set it null)
226
+ *
233
227
  * @return false if already stopped
234
228
  */
235
229
  public boolean stopThread();
236
230
 
237
- /**
238
- *
239
- * @return
240
- */
241
- public boolean isStopped();
231
+ /**
232
+ *
233
+ * @return
234
+ */
235
+ public boolean isStopped();
242
236
  }