diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 4ff557f50..c8d808083 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -1519,8 +1519,10 @@ public class PApplet implements PConstants { throw new RuntimeException("The sketchRenderer() method is not implemented."); } } - surface.setSize(w, h); - g.setPath(path); // finally, a path + // size() shouldn't actually do anything here [3.0a8] +// surface.setSize(w, h); + // this won't be absolute, which will piss off PDF [3.0a8] +// g.setPath(path); // finally, a path // // Run this from the EDT, just cuz it's AWT stuff (or maybe later Swing) // EventQueue.invokeLater(new Runnable() { @@ -1659,7 +1661,7 @@ public class PApplet implements PConstants { */ public PGraphics createGraphics(int w, int h, String renderer, String path) { - return makeGraphics(w, h, renderer, savePath(path), false); + return makeGraphics(w, h, renderer, path, false); /* if (path != null) { path = savePath(path); @@ -1680,9 +1682,7 @@ public class PApplet implements PConstants { /** * Version of createGraphics() used internally. - * @param path A full (not relative) path. - * {@link PApplet#createGraphics} will call - * {@link PApplet#savePath} first. + * @param path A path (or null if none), can be absolute or relative ({@link PApplet#savePath} will be called) */ protected PGraphics makeGraphics(int w, int h, String renderer, String path, @@ -1712,9 +1712,8 @@ public class PApplet implements PConstants { pg.setParent(this); pg.setPrimary(primary); - System.out.println("path is " + path); if (path != null) { - pg.setPath(path); + pg.setPath(savePath(path)); } // pg.setQuality(sketchQuality()); // if (!primary) { diff --git a/java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java b/java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java index 12381260b..f0a3564ea 100644 --- a/java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java +++ b/java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java @@ -72,7 +72,9 @@ public class PGraphicsPDF extends PGraphicsJava2D { this.path = path; if (path != null) { file = new File(path); - if (!file.isAbsolute()) file = null; + if (!file.isAbsolute()) { + file = null; + } } if (file == null) { throw new RuntimeException("PGraphicsPDF requires an absolute path " + diff --git a/java/src/processing/mode/java/preproc/PdePreprocessor.java b/java/src/processing/mode/java/preproc/PdePreprocessor.java index 5f0123967..c68bc524c 100644 --- a/java/src/processing/mode/java/preproc/PdePreprocessor.java +++ b/java/src/processing/mode/java/preproc/PdePreprocessor.java @@ -203,7 +203,6 @@ 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];