Simple drawing that fades to background.
#8
Here's how I tend to do a simple little screen fade routine:

Code: (Select All)
Screen _NewImage(1024, 720, 32)

Color -1 'white

Do
    While _MouseInput: Wend
    mx = _MouseX: my = _MouseY
    If _MouseButton(1) Then
        If oldx = 0 And oldy = 0 Then
            PSet (mx, my)
        Else
            Line (oldx, oldy)-(mx, my)
        End If
        oldx = mx: oldy = my
    End If
    Line (0, 0)-(_Width, _Height), &H20000000, BF 'low alpha black
    _Limit 10
Loop Until _MouseButton(2) Or _KeyHit

Use the mouse, press the button, and move the pointer. You'll scribble lines on the screen which will slowly fade off into oblivion behind you as you go.

I call this demo "Scribble Fade!"
Reply


Messages In This Thread
Simple drawing that fades to background. - by Dav - 11-04-2022, 10:27 PM
RE: Simple drawing that fades to background. - by SMcNeill - 11-05-2022, 12:01 PM



Users browsing this thread: 2 Guest(s)