Code: Select all
Procedure CreateShadow(x,y,w,h,depth)
Protected temp
temp=CreateImage(#PB_Any,w,h,32|#PB_Image_Transparent)
PushDrawingState(); ***
StartDrawing(ImageOutput(temp))
; Prepare Shadow
StopDrawing()
PopDrawingState(); ***
DrawAlphaImage(ImageID(temp),x,y,depth)
FreeImage(temp)
EndProcedure
CreateImage(1,800,800,32)
StartDrawing(ImageOutput(1))
For i=1 To 20
x=Random(800)
y=Random(800)
DrawText(x,y,"Test")
CreateShadow(x,y,200,200,20)
Next i
StopDrawing()