We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi there,
I am relatively new to processing and am trying to export an application for the first time.
However the sketch did not appear as desired on every machine that I tried on. Then I released that it is because I make use of the size(displayWidth, displayHeight, P3D);
command. Thus, obviously it only appeared well on screens with the same resolution as the screen of the PC I created the sketch on.
Can anyone suggest a way how to make a sketch appear properly on any screen resolution?
I think it involves in setting each and every coordinate relative to the screen width and height right? However thinks may be more complicated since I am making use of images which I assume need to be re-sized in some way.
So basically I want the sketch to be re-sized to accommodate the resolution of the screen while maintain the aspect ratio.
Any tips will be greatly appreciated!
Answers
Anything which depends on canvas' dimensions should scale according to variables width & height:
Sometimes we need to resize() PImage objects in relation to width & height too:
This for your tips. However wouldn't this lose the aspect radio of the sketch?
The other cheap option is to have a fixed dimensions. However the application won't be adequate for all screen sizes.
I have one more questions regarding Exporting. I need to present the application as a project to my collage. Thus I am trying to make the application as attractive as possible. Therefore I would like to know if there is a way how to prevent the console from opening when running a processing application? Till now I cannot find any so I am assuming that there isn't.
The other cheap option is to have fixed dimensions.
However the application won't be adequate for all screen sizes.
Simplest solution is decide a proper fixed ratio size() based on displayWidth & displayHeight.