10-22-2024, 02:14 AM
The problem here, is you're giving it an impossible task to try and sort out and it's exploding on you.
_RESIZE ON, _SMOOTH and _RESIZE ON, _STRETCH tries to do one important thing for you -- it tries to maintain your aspect ratio.
Start with a 600x400 screen, drag it to where it's twice as wide, and it becomes a 1200x 800 screen. It maintains that 3:2 aspect ratio for you.
So in this case, you're starting with a screen which is 1000 x 500, so it has a 2:1 aspect ratio.
Then you tell it to _RESIZE ON, _SMOOTH, which means it's going to try and maintain that 2:1 ratio.
Then you tell it to create a 1400x965 screen... Which is anything BUT a 2:1 aspect ratio screen.
How exactly is it supposed to stretch your 1000x500 screen, and maintain a 2:1 aspect ratio, and put it on a 1400x965 screen? It can't do it, and it just more-or-less explodes trying.
I think the only thing you can do in a case like this is to turn _RESIZE OFF, make the screen the size you want it to be, and then turn _RESIZE ON, _SMOOTH afterwards.
Exactly what do you envision happening here? You can't stretch a 2:1 screen and keep the same aspect ratio on a 7:5 (estimated) screen. Not without skewing and scaling and making something go funky somewhere along the way.
_RESIZE ON, _SMOOTH and _RESIZE ON, _STRETCH tries to do one important thing for you -- it tries to maintain your aspect ratio.
Start with a 600x400 screen, drag it to where it's twice as wide, and it becomes a 1200x 800 screen. It maintains that 3:2 aspect ratio for you.
So in this case, you're starting with a screen which is 1000 x 500, so it has a 2:1 aspect ratio.
Then you tell it to _RESIZE ON, _SMOOTH, which means it's going to try and maintain that 2:1 ratio.
Then you tell it to create a 1400x965 screen... Which is anything BUT a 2:1 aspect ratio screen.
How exactly is it supposed to stretch your 1000x500 screen, and maintain a 2:1 aspect ratio, and put it on a 1400x965 screen? It can't do it, and it just more-or-less explodes trying.
I think the only thing you can do in a case like this is to turn _RESIZE OFF, make the screen the size you want it to be, and then turn _RESIZE ON, _SMOOTH afterwards.
Code: (Select All)
$Resize:On
'_Resize Off
MenuScreen& = _NewImage(1000, 500, 32)
MainScreen& = _NewImage(1400, 965, 32)
start:
_Resize Off: _Delay .25 'turn off resizing when manually setting a display, give time for setting to change
Screen MenuScreen&
_Delay .25: _Resize On , _Smooth 'turn back on, after time has passed and screen has changed size
_ScreenMove 200, 50
_ScreenMove 175, 10
Cls
Print "smaller screen"
wfk
_Resize Off: _Delay .25 'turn off resizing when manually setting a display, give time for setting to change
Screen MainScreen&
_Delay .25: _Resize On , _Smooth 'turn back on, after time has passed and screen has changed size
w# = _Width
h# = _Height
Cls
Print "larger screen as "; w#; " x "; h#
wfk
GoTo start
Sub wfk ' wfk=wait for key
i$ = ""
While i$ = ""
i$ = InKey$
Wend
If i$ = Chr$(27) Then System
End Sub
Exactly what do you envision happening here? You can't stretch a 2:1 screen and keep the same aspect ratio on a 7:5 (estimated) screen. Not without skewing and scaling and making something go funky somewhere along the way.