Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting size larger than resolution? #300

Open
pikeas opened this issue Dec 26, 2020 · 3 comments
Open

Setting size larger than resolution? #300

pikeas opened this issue Dec 26, 2020 · 3 comments

Comments

@pikeas
Copy link

pikeas commented Dec 26, 2020

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
@github-actions
Copy link
Contributor

Thank you for submitting your first issue to p5py

@tushar5526
Copy link
Member

off-screen buffer is not yet supported in p5py, but it will be possible after #212.

@pikeas
Copy link
Author

pikeas commented Dec 27, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants