Page 1 of 1

Taking aspect ratio into account

Posted: Sun Oct 10, 2021 9:13 pm
by emeck
Hello,

can someone point me to resources about how to deal when programming for different aspect ratios? I have similar ratio in my PowerBook and RPi displays but I also have a couple of 4:3 displays. I would like to learn what techniques I can use to target different aspect ratios.

Thanks!

Re: Taking aspect ratio into account

Posted: Sat Oct 16, 2021 11:57 pm
by airsoftsoftwair
You could use the „FullScreenScale“ mode combined with the „KeepProportions“ tag. Then your script will automatically adapt to the best size for the current resolution while maintaining the aspect ratio.

Re: Taking aspect ratio into account

Posted: Tue Oct 19, 2021 11:25 am
by emeck
airsoftsoftwair wrote: Sat Oct 16, 2021 11:57 pm You could use the „FullScreenScale“ mode combined with the „KeepProportions“ tag. Then your script will automatically adapt to the best size for the current resolution while maintaining the aspect ratio.
Thanks. I tried with "FullScreen" mode and it looks very good, no distortions. Using "KeepProportions“ tag doesn't seem to affect "FullScreen" mode.

So, it works. Thanks again Andreas.

Re: Taking aspect ratio into account

Posted: Wed Oct 20, 2021 4:32 pm
by airsoftsoftwair
emeck wrote: Tue Oct 19, 2021 11:25 am Thanks. I tried with "FullScreen" mode and it looks very good, no distortions. Using "KeepProportions“ tag doesn't seem to affect "FullScreen" mode.
Yes, "FullScreen" will change the physical resolution of the monitor so "KeepProportions" doesn't make sense in that context. It's only needed when using a fullscreen mode that scales graphics instead of changing the monitor resolution.