06-16-2024, 01:24 PM
Right after I posted that I got an idea, this method is much faster because I don't have to use CIRCLE to darken the entire image, only the mouse area.
- Dav
- Dav
Code: (Select All)
Screen _NewImage(1000, 700, 32)
'draw a background
For x = 0 To _Width Step 25
For y = 0 To _Height Step 25
Line (x, y)-Step(25, 25), _RGBA(Rnd * 255, Rnd * 255, Rnd * 255, 150), BF
Next
Next
back& = _CopyImage(_Display) 'image to use
work& = _CopyImage(_Display) 'work screen
area& = _NewImage(600, 600, 32) 'faded area image
Do
'get mouse input
While _MouseInput: Wend
mx = _MouseX: my = _MouseY
'point to the work screen
_Dest work&
'place background first
_PutImage (0, 0), back&
'draw fadeout circle where mouse x/y is
For x = 0 To 450 Step .333
Circle (mx, my), x, _RGBA(0, 0, 0, x / 1.9)
Next
'put changed part of work screen into area&
_PutImage (0, 0), work&, area&, (mx - 300, my - 300)-(mx + 300, my + 300)
'go back to main screen
_Dest 0
'clear it
Line (0, 0)-(_Width, _Height), _RGB(0, 0, 0), BF
'put faded area& onto screen
_PutImage (mx - 300, my - 300), area&
_Display
_Limit 30
Loop Until InKey$ <> ""