
Code: Select all
If OpenWindow(0, 0, 0, 100, 100, "Kreis mit Transparenz", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
; Bild mit 32-bit Farbtiefe und Alphakanal erstellen
CreateImage(0, 100, 100, 32, #PB_Image_Transparent)
If StartDrawing(ImageOutput(0))
; Roten Kreis zeichnen (voll deckend)
DrawingMode(#PB_2DDrawing_AllChannels)
Circle(50, 50, 40, RGBA(255, 0, 0, 255))
StopDrawing()
EndIf
; Bild-Gadget mit aktivierter Alphatransparenz anzeigen
ImageGadget(0, 0, 0, 100, 100, ImageID(0))
; Ereignisschleife
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf