| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -47,6 +47,8 @@ public PSurfaceNone(PGraphics graphics) { | |||
| 47 | 47 | @Override | |
| 48 | 48 | public void initOffscreen(PApplet sketch) { | |
| 49 | 49 | this.sketch = sketch; | |
| 50 | + | ||
| 51 | + setSize(sketch.sketchWidth(), sketch.sketchHeight()); | ||
| 50 | 52 | } | |
| 51 | 53 | ||
| 52 | 54 | ||
@@ -59,7 +61,9 @@ public void initOffscreen(PApplet sketch) { | |||
| 59 | 61 | public void initFrame(PApplet sketch, int backgroundColor, | |
| 60 | 62 | int deviceIndex, boolean fullScreen, | |
| 61 | 63 | boolean spanDisplays) { | |
| 62 | - this.sketch = sketch; | ||
| 64 | + //this.sketch = sketch; | ||
| 65 | + throw new IllegalStateException("initFrame() not available with " + | ||
| 66 | + getClass().getSimpleName()); | ||
| 63 | 67 | } | |
| 64 | 68 | ||
| 65 | 69 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -203,6 +203,7 @@ public PdePreprocessor(final String sketchName, final int tabSize) { | |||
| 203 | 203 | ||
| 204 | 204 | public String[] initSketchSize(String code, boolean sizeWarning) throws SketchException { | |
| 205 | 205 | String[] info = parseSketchSize(code, sizeWarning); | |
| 206 | + //PApplet.printArray(info); | ||
| 206 | 207 | if (info != null) { | |
| 207 | 208 | sizeStatement = info[0]; | |
| 208 | 209 | sketchWidth = info[1]; | |
@@ -274,8 +275,8 @@ static public String[] parseSketchSize(String code, boolean fussy) { | |||
| 274 | 275 | //String[] matches = split on commas, but not commas inside quotes | |
| 275 | 276 | ||
| 276 | 277 | StringList args = breakCommas(contents[1]); | |
| 277 | - String width = args.get(0); | ||
| 278 | - String height = args.get(1); | ||
| 278 | + String width = args.get(0).trim(); | ||
| 279 | + String height = args.get(1).trim(); | ||
| 279 | 280 | String renderer = (args.size() >= 3) ? args.get(2) : null; | |
| 280 | 281 | String path = (args.size() >= 4) ? args.get(3) : null; | |
| 281 | 282 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments