Page 1 of 1

PB 6.30 b1 - #PB_Image_Transparent don't work

Posted: Tue Sep 02, 2025 8:03 am
by Lebostein
Image

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

Re: PB 6.30 b1 - #PB_Image_Transparent don't work

Posted: Tue Sep 02, 2025 8:38 am
by Fred
I forgot to update the constants for OSX and Linux, should be fixed for next beta. Thanks !