picrate 0.7.0-java → 0.8.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.mvn/wrapper/MavenWrapperDownloader.java +117 -0
- data/.mvn/wrapper/maven-wrapper.properties +2 -1
- data/.travis.yml +2 -5
- data/CHANGELOG.md +4 -0
- data/README.md +3 -3
- data/Rakefile +15 -27
- data/docs/_config.yml +1 -1
- data/docs/_posts/2018-05-11-arch-linux-arm.md +1 -1
- data/docs/_posts/2018-11-18-building-gem.md +1 -1
- data/lib/picrate/app.rb +1 -1
- data/lib/picrate/native_folder.rb +1 -1
- data/lib/picrate/version.rb +1 -1
- data/mvnw +127 -51
- data/mvnw.cmd +182 -0
- data/pom.rb +39 -30
- data/pom.xml +50 -37
- data/src/main/java/monkstone/ColorUtil.java +1 -1
- data/src/main/java/monkstone/core/LibraryProxy.java +0 -1
- data/src/main/java/monkstone/noise/SimplexNoise.java +1 -1
- data/src/main/java/monkstone/vecmath/GfxRender.java +87 -0
- data/src/main/java/monkstone/vecmath/ShapeRender.java +1 -1
- data/src/main/java/monkstone/vecmath/vec2/Vec2.java +1 -1
- data/src/main/java/processing/awt/PGraphicsJava2D.java +48 -50
- data/src/main/java/processing/awt/PShapeJava2D.java +10 -0
- data/src/main/java/processing/awt/PSurfaceAWT.java +315 -371
- data/src/main/java/processing/core/PApplet.java +15424 -15495
- data/src/main/java/processing/core/PConstants.java +4 -4
- data/src/main/java/processing/core/PFont.java +394 -369
- data/src/main/java/processing/core/PGraphics.java +11 -10
- data/src/main/java/processing/core/PImage.java +1389 -1435
- data/src/main/java/processing/core/PMatrix2D.java +297 -294
- data/src/main/java/processing/core/PMatrix3D.java +641 -594
- data/src/main/java/processing/core/PShape.java +1755 -1784
- data/src/main/java/processing/core/PShapeOBJ.java +145 -133
- data/src/main/java/processing/core/PShapeSVG.java +808 -801
- data/src/main/java/processing/core/PStyle.java +141 -149
- data/src/main/java/processing/core/PSurface.java +111 -117
- data/src/main/java/processing/core/PSurfaceNone.java +178 -187
- data/src/main/java/processing/javafx/PGraphicsFX2D.java +349 -346
- data/src/main/java/processing/opengl/FontTexture.java +40 -59
- data/src/main/java/processing/opengl/FrameBuffer.java +28 -18
- data/src/main/java/processing/opengl/LinePath.java +7 -7
- data/src/main/java/processing/opengl/LineStroker.java +6 -10
- data/src/main/java/processing/opengl/PGL.java +56 -44
- data/src/main/java/processing/opengl/PGraphicsOpenGL.java +909 -2338
- data/src/main/java/processing/opengl/PJOGL.java +1722 -1763
- data/src/main/java/processing/opengl/PShader.java +1308 -1192
- data/src/main/java/processing/opengl/PShapeOpenGL.java +487 -1811
- data/src/main/java/processing/opengl/PSurfaceJOGL.java +482 -497
- data/src/main/java/processing/opengl/Texture.java +99 -76
- data/src/main/java/processing/opengl/VertexBuffer.java +41 -43
- data/vendors/Rakefile +1 -1
- 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
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
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
|
-
*
|
34
|
-
*
|
35
|
-
*
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
*
|
69
|
-
*
|
70
|
-
*
|
71
|
-
*
|
72
|
-
*
|
73
|
-
|
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
|
-
|
84
|
-
|
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
|
-
/**
|
88
|
-
|
86
|
+
/**
|
87
|
+
* Show or hide the window.
|
88
|
+
*
|
89
|
+
* @param visible
|
90
|
+
*/
|
89
91
|
public void setVisible(boolean visible);
|
90
92
|
|
91
|
-
/**
|
92
|
-
|
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
|
-
/**
|
96
|
-
|
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
|
-
|
102
|
-
|
103
|
-
|
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
|
-
|
112
|
-
|
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
|
-
|
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
|
-
|
140
|
-
|
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
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
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
|
-
|
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
|
-
|
192
|
-
*/
|
193
|
-
|
182
|
+
/**
|
183
|
+
*
|
184
|
+
* @param kind
|
185
|
+
*/
|
194
186
|
public void setCursor(int kind);
|
195
187
|
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
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
|
-
|
196
|
+
/**
|
197
|
+
*
|
198
|
+
*/
|
199
|
+
public void showCursor();
|
208
200
|
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
201
|
+
/**
|
202
|
+
*
|
203
|
+
*/
|
204
|
+
public void hideCursor();
|
213
205
|
|
214
206
|
//
|
215
|
-
|
216
|
-
|
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
|
-
|
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
|
-
|
240
|
-
|
241
|
-
|
231
|
+
/**
|
232
|
+
*
|
233
|
+
* @return
|
234
|
+
*/
|
235
|
+
public boolean isStopped();
|
242
236
|
}
|