Hello Processing friends. I wonder if anyone could help please. I have a sketch that renders stuff in a small main window, and when ready renders it at hi-res to a PGraphics which is then saved to a file. My code is ugly, like this:
and so on, all draw and style commands needing this test. Yuck. I would much prefer something like the following, but I can’t see how to do it:
PGraphics hires, target;
if (hiresMode) { target = highres; } else {target= USUALWINDOW; }
target.ellipse(...); // all commands now are target.command()
so no more if statement madness. Is this possible? And a supplementary question – can target also be used as target.beginDraw() or do we always need to treat a PGraphics specially?