How can I draw the text transparent?
Code: Select all
Global Window_0, canvas
Procedure OpenWindow_0(x = 0, y = 0, width = 440, height = 220)
Window_0 = OpenWindow(#PB_Any, x, y, width, height, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
canvas = CanvasGadget(#PB_Any, 20, 40, 400, 160)
If StartDrawing(CanvasOutput(canvas))
DrawingMode(#PB_2DDrawing_AlphaChannel)
FrontColor(RGBA(0,0,0, 200))
BackColor(RGBA(255,255,255, 255))
DrawText(20, 20, "Hello Wold")
Box(120, 20, 60, 60, RGBA(0,0,0, 128))
StopDrawing()
EndIf
EndProcedure
Procedure Window_0_Events(event)
Select event
Case #PB_Event_CloseWindow
ProcedureReturn #False
Case #PB_Event_Menu
Select EventMenu()
Case #PB_Menu_Quit
ProcedureReturn #False
EndSelect
Case #PB_Event_Gadget
Select EventGadget()
Case canvas
If EventType() = #PB_EventType_LeftClick
EndIf
EndSelect
EndSelect
ProcedureReturn #True
EndProcedure
OpenWindow_0()
Repeat
event = WaitWindowEvent()
Until Window_0_Events(event) = #False