Purebasic 5.6
Danke.
Gruss
77000 Byte groß als EXE :
Code: Alles auswählen
Global buffer.l,pitch.l,PixelFormat.l,zaehler.l
Enumeration
#Window_0
#canv
EndEnumeration
OpenWindow(#window_0, 10,10, 500,500, "Canvas")
CanvasGadget(#canv, 10, 10, 400, 400)
StartDrawing(CanvasOutput(#canv))
buffer = DrawingBuffer()
!MOV ebx,dword [v_buffer]
!MOV ecx,160000
!nextbyte:
!MOV dword [ebx],$00ff00
!add ebx,3
!dec ecx
!TEST ecx, ecx
!JNZ nextbyte
StopDrawing()
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
EventGadget = EventGadget()
EventType = EventType
Case #PB_Event_CloseWindow
EventWindow = EventWindow()
If EventWindow = #Window_0
CloseWindow(#Window_0)
Break
EndIf
EndSelect
ForEver
Code: Alles auswählen
Global buffer.l,pitch.l,PixelFormat.l,zaehler.l
Enumeration
#Window_0
#canv
EndEnumeration
OpenWindow(#window_0, 10,10, 500,500, "Canvas")
CanvasGadget(#canv, 10, 10, 400, 400)
StartDrawing(CanvasOutput(#canv))
buffer = DrawingBuffer()
!MOV ebx,dword [v_buffer]
!Repeat 160000
!MOV dword [ebx],$ff0000
!add ebx,3
!End Repeat
StopDrawing()
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
EventGadget = EventGadget()
EventType = EventType
Case #PB_Event_CloseWindow
EventWindow = EventWindow()
If EventWindow = #Window_0
CloseWindow(#Window_0)
Break
EndIf
EndSelect
ForEver