| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1519,8 +1519,10 @@ public void size(final int w, final int h, String renderer, String path) { | |||
| 1519 | 1519 | throw new RuntimeException("The sketchRenderer() method is not implemented."); | |
| 1520 | 1520 | } | |
| 1521 | 1521 | } | |
| 1522 | - surface.setSize(w, h); | ||
| 1523 | - g.setPath(path); // finally, a path | ||
| 1522 | + // size() shouldn't actually do anything here [3.0a8] | ||
| 1523 | + // surface.setSize(w, h); | ||
| 1524 | + // this won't be absolute, which will piss off PDF [3.0a8] | ||
| 1525 | + // g.setPath(path); // finally, a path | ||
| 1524 | 1526 | ||
| 1525 | 1527 | // // Run this from the EDT, just cuz it's AWT stuff (or maybe later Swing) | |
| 1526 | 1528 | // EventQueue.invokeLater(new Runnable() { | |
@@ -1659,7 +1661,7 @@ public PGraphics createGraphics(int w, int h, String renderer) { | |||
| 1659 | 1661 | */ | |
| 1660 | 1662 | public PGraphics createGraphics(int w, int h, | |
| 1661 | 1663 | String renderer, String path) { | |
| 1662 | - return makeGraphics(w, h, renderer, savePath(path), false); | ||
| 1664 | + return makeGraphics(w, h, renderer, path, false); | ||
| 1663 | 1665 | /* | |
| 1664 | 1666 | if (path != null) { | |
| 1665 | 1667 | path = savePath(path); | |
@@ -1680,9 +1682,7 @@ public PGraphics createGraphics(int w, int h, | |||
| 1680 | 1682 | ||
| 1681 | 1683 | /** | |
| 1682 | 1684 | * Version of createGraphics() used internally. | |
| 1683 | - * @param path A full (not relative) path. | ||
| 1684 | - * {@link PApplet#createGraphics} will call | ||
| 1685 | - * {@link PApplet#savePath} first. | ||
| 1685 | + * @param path A path (or null if none), can be absolute or relative ({@link PApplet#savePath} will be called) | ||
| 1686 | 1686 | */ | |
| 1687 | 1687 | protected PGraphics makeGraphics(int w, int h, | |
| 1688 | 1688 | String renderer, String path, | |
@@ -1712,9 +1712,8 @@ protected PGraphics makeGraphics(int w, int h, | |||
| 1712 | 1712 | ||
| 1713 | 1713 | pg.setParent(this); | |
| 1714 | 1714 | pg.setPrimary(primary); | |
| 1715 | - System.out.println("path is " + path); | ||
| 1716 | 1715 | if (path != null) { | |
| 1717 | - pg.setPath(path); | ||
| 1716 | + pg.setPath(savePath(path)); | ||
| 1718 | 1717 | } | |
| 1719 | 1718 | // pg.setQuality(sketchQuality()); | |
| 1720 | 1719 | // if (!primary) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -72,7 +72,9 @@ public void setPath(String path) { | |||
| 72 | 72 | this.path = path; | |
| 73 | 73 | if (path != null) { | |
| 74 | 74 | file = new File(path); | |
| 75 | - if (!file.isAbsolute()) file = null; | ||
| 75 | + if (!file.isAbsolute()) { | ||
| 76 | + file = null; | ||
| 77 | + } | ||
| 76 | 78 | } | |
| 77 | 79 | if (file == null) { | |
| 78 | 80 | throw new RuntimeException("PGraphicsPDF requires an absolute path " + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -203,7 +203,6 @@ 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); | ||
| 207 | 206 | if (info != null) { | |
| 208 | 207 | sizeStatement = info[0]; | |
| 209 | 208 | sketchWidth = info[1]; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments