fix more of size() parsing, get PDF working

This commit is contained in:
Ben Fry
2015-05-16 09:09:04 -04:00
parent e52be3f71b
commit 1c2738be05
2 changed files with 8 additions and 3 deletions

View File

@@ -203,6 +203,7 @@ public class PdePreprocessor {
public String[] initSketchSize(String code, boolean sizeWarning) throws SketchException {
String[] info = parseSketchSize(code, sizeWarning);
//PApplet.printArray(info);
if (info != null) {
sizeStatement = info[0];
sketchWidth = info[1];
@@ -274,8 +275,8 @@ public class PdePreprocessor {
//String[] matches = split on commas, but not commas inside quotes
StringList args = breakCommas(contents[1]);
String width = args.get(0);
String height = args.get(1);
String width = args.get(0).trim();
String height = args.get(1).trim();
String renderer = (args.size() >= 3) ? args.get(2) : null;
String path = (args.size() >= 4) ? args.get(3) : null;