screen = makeBackDrop()
setfps 30
do
cls $304050
mx=mousex()
my=mousey()
rendertoimage screen
mask=MakeMaskedCircleImage(mx,my,50,5)
rendertoscreen
drawimage mask,mx,my,true
deleteimage mask
sync
loop spacekey()
Function MakeMaskedCircleImage(Xpos,Ypos,Size,Pad=5)
oldinkmode =GetInkmode()
RadiusX=Size
RadiusY=Size
Width =Pad+(RadiusX*2)+Pad
Height=Pad+(RadiusY*2)+Pad
Mask=NewFximage(Width,height,true)
OldSurface=getsurface()
Xpos-=Pad
Ypos-=Pad
copyrect OldSurface,xpos,ypos,Xpos+Width*2,Ypos+Height,Mask,0,0
rendertoimage Mask
inkmode 1+512
Circlec Width/2,Height/2,Size,true,$ff000000
rendertoimage OldSurface
inkmode OldInkMode
EndFunction Mask
Function MakeBackDrop()
Screen=NewFXImage(800,600)
rendertoimage Screen
shadebox 0,0,800,600,$112233,$445566,$aa88bb,$332288
loadfont "veranda",2,100,0
setfont 2
centertext 400,240,"Hello World"
setfont 1
rendertoscreen
rgbmaskimage Screen,$00ffffff
EndFunction Screen