Is there a way to resize the display window during the program execution?
in
Programming Questions
•
1 year ago
As the title says, I would like to resize the display window during the execution.
In my program, every time I click on the window I can choose an image to display and I would like the display size fits every time the size of the image displayed.
Something like this:
In my program, every time I click on the window I can choose an image to display and I would like the display size fits every time the size of the image displayed.
Something like this:
- PImage img;
- void setup(){
- pickImage();
- }
- void draw(){
- }
- void mousePressed(){
- pickImage();
- }
- void pickImage(){
- String path=selectInput();
- img=loadImage(path);
- size(img.width,img.height);
- image(img,0,0,width,height);
- }
1