Saving a frame to be printed in large format

I am running a sketch that involves interaction so that I need to be able to see the entire sketch while it is running. I would like to run the sketch at a large size so that I have a high resolution output for the frames that I capture to print. However, my view is limited to the size of my monitor unless I create a PDF or write off the screen, in which case I am unable to view and interact with the sketch while it is running. Is there a way to make the size of the canvas very large and also to be able to see and interact with the sketch while it runs and save it to a format that will allow for a high resolution print? Thanks for you help on this.

1 Like

Hi bp396.
As far as I know PGraphics can’t be resized.
And when you get() it within a PImage (that can be resized), all drawing outside of the screen will not be included.
The only way I can think of is drawing all within a PGraphics, (that can be saved afterwards without losing any drawing), and at the same time you scale down everything drawing on the screen multiplying with a factor.

It depends on your content, and how it is defined by interaction. Some approaches:

  1. create one buffer: PGraphics big. Each event, draw on big, then update the display copy: PImage screen = big.get(); screen.resize(); image(screen,0,0);. This is simple, but the resizing is costly / slow, especially if you are doing it a lot.
  2. create one buffer: PGraphics big. Each event, draw on big, then draw to the screen/canvas using a five-argument image() call that resizes on the fly. This is even simpler than 1, but even slower as it resizes every frame.
  3. create two buffers: PGrapics screen and PGraphics big. Each event, draw on both (one could simply be the canvas).
  4. create one buffer: screen (or just draw straight onto the canvas). Each event, save your events as vector data in a list, then render then onto the screen at screen-scale. When done, use this same vector data to render your print size image for export. This is the fastest, but requires the most code and depends a lot on your design.

For any approach, each frame, display screen. At the end, save big.