File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 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 {
7373// static final public boolean DEBUG = true;
7474 static final public boolean DEBUG = false ;
7575
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+
7680 // Convenience public constant holding the SDK version, akin to platform in Java mode
7781 static final public int SDK = android .os .Build .VERSION .SDK_INT ;
7882// 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 { }
161165 public int [] pixels ;
162166
163167 /** width of this applet's associated PGraphics */
164- public int width ;
168+ public int width = DEFAULT_WIDTH ;
165169
166170 /** height of this applet's associated PGraphics */
167- public int height ;
171+ public int height = DEFAULT_HEIGHT ;
168172
169173 // can't call this because causes an ex, but could set elsewhere
170174 //final float screenDensity = getResources().getDisplayMetrics().density;
You can’t perform that action at this time.
0 commit comments