Code: Select all
StartDrawing(ImageOutput(hImg))
*pbuffer = DrawingBuffer()
StopDrawing()
Thankyou!
Code: Select all
StartDrawing(ImageOutput(hImg))
*pbuffer = DrawingBuffer()
StopDrawing()
Code: Select all
StartDrawing(ImageOutput(hImg))
*pbuf = DrawingBuffer()
StopDrawing()
;... *pbuf may no longer be valid now, BUT the image buffer (wherever it now is)
;should be static and accessible to us to directly modify? just need the addy!
Code: Select all
Procedure GetImageBuffer(Image)
Protected rep = CocoaMessage(0, CocoaMessage(0, ImageID(Image), "representations"), "firstObject")
ProcedureReturn CocoaMessage(0, rep, "bitmapData")
EndProcedure
Code: Select all
Procedure DrawShadow(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))
x=10
y=10
DrawText(x,y,"Test")
DrawShadow(x,y,200,200,20)
StopDrawing()