I expected this program to draw a dark box that gradually got lighter.
Code: Select all
#width=1000
#height=1000
ALP=1
no=0
OpenWindow(0,100,0,#width,#height,"Window")
CreateImage(0,#width,#height)
ImageGadget(0,0,0,#width,#height,ImageID(0))
Repeat
StartDrawing(ImageOutput(0))
DrawingMode(#PB_2DDrawing_AlphaBlend)
Box(100,100,800,800,RGBA(255,255,255,ALP))
no=no+1
StopDrawing()
SetGadgetState(0,ImageID(0))
Delay(40)
Debug no
Event = WindowEvent()
If Event = #PB_Event_CloseWindow
End
EndIf
Until no=512
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
Do I have to make it 32 bit first?
I expected the same program with ALP=2 to draw a box that gets brighter and eventually white, but it does not, it stays middle-grey-ish.
Is there a drawing mode that will give me what I expect? Is it that I need to have the image in 32 bit mode? I can't get an image into 32 bit mode, because when I add for example: CreateImage(0,#width,#height,32) - Then the image is reported as not initialised.