Re: math for resising images for screen display
Posted: Fri Dec 18, 2015 6:13 am
Thanks, davido; always appreciated.davido wrote:An excellent, concise, example.
Thank you very much for sharing.

http://www.purebasic.com
https://www.purebasic.fr/english/
Thanks, davido; always appreciated.davido wrote:An excellent, concise, example.
Thank you very much for sharing.
Perfectly - thank you.TI-994A wrote:Thanks, fromVB. Glad you find it useful.fromVB wrote:...why do you open the window and image gadget twice?
Rather than fiddling with desktops, the simplest approach would be to obtain the full-screen dimensions from a maximized window. This saves a lot of hassle, especially if there are multiple desktops.
However, if the image dimensions are smaller than a maximized window, the window (same window number) is re-initialised without the maximized flag, while still benefiting from the screen-centred flag. Again, this saves the hassle of fiddling with desktops to centre the window. Accordingly, if the window is re-initialised, the image gadget has to be as well.
It should also be noted that the DesktopWidth() and DesktopHeight() functions do not account for the desktop's taskbar.
Hope it answers your question.