With PB 4.40 we have a lot of 2ddrawing changes.
@PB-Team: Is WindowOutput() still a pointer to an
internal DrawingInfoStruct Structure? And if so,
where can I find the new definition?
Or how can I draw on gadgets now like this with
PB 4.31:
Code: Select all
; http://www.purebasic.fr/english/viewtopic.php?t=22328
; User: S.M. Posted: Sat Jun 17, 2006 18:52
; Post subject: FastImageOutput
Structure DrawingInfoStruct
Type.l
Window.l
DC.l
ReleaseProcedure.l
PixelBuffer.l
Pitch.l
Width.l
Height.l
Depth.l
PixelFormat.l
StopDirectAccess.l
StartDirectAccess.l
EndStructure
Global FastImgOutputID.DrawingInfoStruct
Procedure ReleaseGadgetOutput()
ReleaseDC_(FastImgOutputID\Window, FastImgOutputID\DC)
EndProcedure
Procedure GadgetOutput(GadgetID) ; returns the outputID for the declared window handle
hwnd = GadgetID(GadgetID)
FastImgOutputID\Type=2
FastImgOutputID\Window=hwnd
FastImgOutputID\DC=GetDC_(hwnd) ;GetWindowDC_(hWnd)
FastImgOutputID\ReleaseProcedure=@ReleaseGadgetOutput()
ProcedureReturn FastImgOutputID
EndProcedure
;Example:
StartDrawing ( GadgetOutput ( #ImageGadget ) )
..