p5
p5 copied to clipboard
Setting size larger than resolution?
Describe the bug
size() values are silently restricted to the display's resolution.
To Reproduce
from p5 import *
def print_sizes():
print(core.p5.sketch.physical_size[0], core.p5.sketch.physical_size[1])
print(core.p5.sketch.size[0], core.p5.sketch.size[1])
print(width, height) # globals / builtins set by p5
def setup():
size(4000, 4000)
no_loop()
print_sizes()
def draw():
print_sizes()
if __name__ == "__main__":
run()
Expected behavior Canvas can be larger than screen. Alternately, is there a way to write to an off-screen buffer as in Processing? I'd like to produce high res output suitable for printing.
System information:
- p5 0.7.1 / Python 3.9.1 / macOS 10.15.7
Thank you for submitting your first issue to p5py
off-screen buffer is not yet supported in p5py, but it will be possible after #212.
off-screen buffer is not yet supported in p5py, but it will be possible after #212.
That looks great, I'm looking forward to checking it out!
In the interim, could p5 add a warning or error when a call to size exceeds the maximum value for either dimension?