MacOS - Catalina-10.15.7
Code: Select all
Global 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
If StartDrawing( ImageOutput( img ) )
DrawingMode( #PB_2DDrawing_AllChannels ) ; macos ; linux & windows
Debug Alpha( Point( OutputWidth()/2,5 ) ) ; result = 255 ; result = 0
Debug Alpha( Point( OutputWidth()/2,OutputHeight()/2 ) ) ; result = 255 ; result = 0
StopDrawing( )
EndIf
If StartDrawing( ImageOutput( hole ) )
DrawingMode( #PB_2DDrawing_AllChannels )
Debug Alpha( Point( OutputWidth()/2,5 ) ) ; result = 255 ; result = 255
Debug Alpha( Point( OutputWidth()/2,OutputHeight()/2 ) ) ; result = 0 ; result = 0
StopDrawing( )
EndIf