Code: Select all
Global BackgroundColor, img = LoadImage( #PB_Any, #PB_Compiler_Home + "examples/sources/Data/Geebee2.bmp" )
Global hole = CreateImage( #PB_Any,100,100,32 )
If StartDrawing( ImageOutput( hole ) )
DrawingMode( #PB_2DDrawing_AllChannels )
Box( 0,0,OutputWidth(),OutputHeight(),RGBA( $00,$00,$00,$00 ) )
Circle( 50,50,48,RGBA( $00,$FF,$FF,$FF ) )
Circle( 50,50,30,RGBA( $00,$00,$00,$00 ) )
StopDrawing( )
EndIf
Global alpha = 45
OpenWindow(0, 0, 0, 300, 300, "Test", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
SetWindowColor(0, $C0AED7F2)
StartDrawing(WindowOutput(0))
BackgroundColor = Point(0, 0)
StopDrawing()
ButtonGadget(10, 10, 10, 280, 80, "button")
CanvasGadget(0, 10, 10, 280, 280)
If StartDrawing( CanvasOutput( 0 ) )
FillMemory( DrawingBuffer( ), DrawingBufferPitch( ) * OutputHeight( ), alpha )
DrawingMode( #PB_2DDrawing_Default )
;DrawingMode( #PB_2DDrawing_AlphaBlend )
DrawImage( ImageID( Img ),50,50 )
DrawImage( ImageID( hole ),130,130 )
StopDrawing( )
EndIf
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_CloseWindow
Exit = #True
EndSelect
Until Exit