File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,10 @@ public class PApplet extends Fragment implements PConstants, Runnable {
73
73
// static final public boolean DEBUG = true;
74
74
static final public boolean DEBUG = false ;
75
75
76
+ /** Default width and height for sketch when not specified */
77
+ static public final int DEFAULT_WIDTH = 100 ;
78
+ static public final int DEFAULT_HEIGHT = 100 ;
79
+
76
80
// Convenience public constant holding the SDK version, akin to platform in Java mode
77
81
static final public int SDK = android .os .Build .VERSION .SDK_INT ;
78
82
// static final public int SDK = Build.VERSION_CODES.ICE_CREAM_SANDWICH; // Forcing older SDK for testing
@@ -161,10 +165,10 @@ static public class RendererChangeException extends RuntimeException { }
161
165
public int [] pixels ;
162
166
163
167
/** width of this applet's associated PGraphics */
164
- public int width ;
168
+ public int width = DEFAULT_WIDTH ;
165
169
166
170
/** height of this applet's associated PGraphics */
167
- public int height ;
171
+ public int height = DEFAULT_HEIGHT ;
168
172
169
173
// can't call this because causes an ex, but could set elsewhere
170
174
//final float screenDensity = getResources().getDisplayMetrics().density;
You can’t perform that action at this time.
0 commit comments