I can not erase with a fade of brush 1
Thank for your help
Code: Select all
/* Nouveau projet Hollywood */
SetFillStyle(#FILLCOLOR)
CreateBrush(1, 100, 100, #BLACK, {AlphaChannel = True, Clear=True})
SelectBrush(1,#SELMODE_COMBO,2)
Circle(#CENTER,#CENTER,30,#WHITE)
EndSelect
BlurBrush(1,30)
W=GetAttribute(#BRUSH,1,#ATTRWIDTH)
H=GetAttribute(#BRUSH,1,#ATTRHEIGHT)
/*****************************************/
Function p_Move(msg)
ShowLayer(2,MouseX()-(W*0.51),MouseY()-(H*0.51))
IF IsLeftMouse()
SelectAlphaChannel(Temp)
SetAlphaIntensity(0)
DisplayBrush(1,mouseX()-(W*0.51),mouseY()-(H*0.51))
EndSelect
SelectLayer(1,#SELMODE_COMBO)
DisplayBrush(TEMP,0,0)
EndSelect
EndIf
IF (msg.action="OnRightMouseDown")
SelectAlphaChannel(TEMP)
SetAlphaIntensity(255)
Cls
EndSelect
SelectLayer(1,#SELMODE_COMBO)
DisplayBrush(TEMP,0,0)
EndSelect
EndIF
EndFunction
/*****************************************/
SetInterval(1, p_Move, 1000/50) ; 50fps
InstallEventHandler({OnMouseDown = p_Move, OnRightMouseDown = p_Move})
EnableLayers()
TEMP=CreateBrush(Nil, 640, 480, #BLUE, {AlphaChannel = True, Clear=0})
InsertLayer(1,#BRUSH,TEMP,0,0)
InsertLayer(2,#BRUSH,1,MouseX()-(W*0.51),MouseY()-(H*0.51))
EscapeQuit(True)
/* Boucle infinie */
Repeat
WaitEvent
Forever