Unexpected behavior of size() in setup()
Closed this issue · 4 comments
This is a more descriptive continuation of #372
Describe the bug
Any Shape, background()
,etc. when called together with size()
in setup()
produces unexpected outcomes. With background()
and size()
together in setup()
the background is not changed, in case of a 2D Primitive like circle()
the circle is not visible.
To Reproduce
Run the following codes:
from p5 import *
def setup():
size(512,512)
circle(100,100,50)
run(renderer="skia") # Also with run()
Expected behavior
A 512x512
size window with a circle at (100,100).
Actual behavior
Commenting out size()
:
from p5 import *
def setup():
size(512,512)
background(255)
run(renderer="skia") # Also with run()
Expected behavior
A 512x512
size window with a white(255) background.
Actual behavior
Commenting out size()
:
System information:
- p5 release: 0.8.2
- Python version: 3.10.6
- Operating system: Ubuntu 22.04.1 LTS (64-bit)
Thank you for submitting your first issue to p5py
I would like to work on this issue.
I assume this is something related to setup logic in skia renderer. The swapping of framebuffers is not being done right, I think. You can start looking from there.
Close by #420