Line 1 disappears
#10
And here's a demo of using $RESIZE:ON to scale the screen, like you were originally intending:

Code: (Select All)
$Resize:On
activeScreen = _NewImage(640, 400, 256) '256 color screen so we can use _PUTIMAGE for scaling
viewScreen = _NewImage(640, 400, 256) 'a second screen to scale to
Screen viewScreen
_Dest activeScreen: _Source activeScreen

DrawBorder
_Delay .25
clearInitialResize = _Resize 'clear thr size change from where QB64 first starts up

Do
    If _Resize Then
        tempScreen = _NewImage(_ResizeWidth, _ResizeHeight, 256)
        Screen tempScreen
        _FreeImage viewScreen
        viewScreen = tempScreen
    End If
    _PutImage , activeScreen, viewScreen
    _Limit 30
Loop Until _KeyHit
System

Sub DrawBorder
    Color 4
    For x = 1 To _Width \ _FontWidth
        Locate 1, x: Print Chr$(219);
        Locate _Height \ _FontHeight, x: Print Chr$(219);
    Next
    For y = 1 To _Height \ _FontHeight
        Locate y, 1: Print Chr$(219);
        Locate y, _Width \ _FontWidth: Print Chr$(219);
    Next
    Color 15
    Locate 3, 3: Print "Resize On, Scale-Size Demo"
    Locate 5, 3: Print "Width:"; _Width
    Locate 6, 3: Print "Height:"; _Height
End Sub

Note that it's up to you to maintain the same aspect ratio, which I didn't do here to illustrate how things can "stretch" and distort if you don't do so when manually resizing like this.  Wink
Reply


Messages In This Thread
Line 1 disappears - by BDS107 - 07-20-2022, 09:14 AM
RE: Line 1 disappears - by bplus - 07-22-2022, 04:46 PM
RE: Line 1 disappears - by SMcNeill - 07-22-2022, 05:25 PM
RE: Line 1 disappears - by SMcNeill - 07-22-2022, 05:51 PM
RE: Line 1 disappears - by SMcNeill - 07-22-2022, 05:59 PM
RE: Line 1 disappears - by BDS107 - 07-22-2022, 07:52 PM
RE: Line 1 disappears - by BDS107 - 07-24-2022, 07:10 PM
RE: Line 1 disappears - by SMcNeill - 07-24-2022, 07:50 PM
RE: Line 1 disappears - by admin - 07-24-2022, 08:09 PM
RE: Line 1 disappears - by admin - 07-24-2022, 08:21 PM



Users browsing this thread: 8 Guest(s)