diff --git a/core/PApplet.java b/core/PApplet.java index 440463f10..52153b08c 100644 --- a/core/PApplet.java +++ b/core/PApplet.java @@ -5828,7 +5828,9 @@ public class PApplet extends Applet applet.setupFrameResizeListener(); // all set for rockin - frame.show(); + if (applet.displayable()) { + frame.show(); + } } //System.out.println("showing frame"); @@ -7073,4 +7075,9 @@ public class PApplet extends Applet if (recorder != null) recorder.endRaw(); g.endRaw(); } + + + public boolean displayable() { + return g.displayable(); + } } diff --git a/core/PGraphics.java b/core/PGraphics.java index fcc087be3..50da04bf4 100644 --- a/core/PGraphics.java +++ b/core/PGraphics.java @@ -3578,6 +3578,17 @@ public class PGraphics extends PImage implements PConstants { } + /** + * Return true if this renderer should be drawn to the screen. + * Overridden for subclasses like PDF so that an enormous window + * doesn't open up. + * showFrame, displayable, isVisible, visible, shouldDisplay, + * what to call this? + */ + public boolean displayable() { + return true; + } + //public void beginRaw() { // ignore //beginFrame(); //} diff --git a/core/todo.txt b/core/todo.txt index 7e18bee5c..1e20a2a62 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -1,15 +1,17 @@ 0104 core +X don't open a window the size of the pdf if in pdf mode +X need to have some sort of flag in the gfx context that it's visible or not +o handled inside updateSize()? +X if it doesn't display to the screen, needs to never show a window +X basically if the main gfx context isn't viewable, close the window +X since it may have already been opened at 100x100 +X avoid opening it in the first place? more pdf/recording stuff _ figure out what's up with type on osx -_ don't open a window the size of the pdf if in pdf mode -_ need to have some sort of flag in the gfx context that it's visible or not -_ handled inside updateSize()? -_ if it doesn't display to the screen, needs to never show a window -_ basically if the main gfx context isn't viewable, close the window -_ since it may have already been opened at 100x100 -_ avoid opening it in the first place? +_ sometimes bicubic vs quadratic beziers are mixed up in fonts +_ not sure if it's limited to osx or what _ make dxf writer that'll work with recordRaw() _ document how to switch to next page _ maybe background() should do this automatically?