Zeig mal bitte Deine (schnellere) Version. Bin neugierigremi_meier hat geschrieben:.... und es noch schneller ginge...

Code: Alles auswählen
InitSprite()
OpenWindow(0, 200,200, 300,300, #PB_Window_SystemMenu, "")
OpenWindowedScreen(WindowID(0), 0, 0, 300, 300, 0, 0, 0)
Img = CreateSprite(#PB_Any, 300, 300)
x = 16
y = 16
n = 255
StartDrawing(ScreenOutput())
For r = 0 To n
For s = 0 To n-r
If (r & s)
cR.l = 64+r/4
cG.l = s/4
cB.l = s/2+64
;Plot(x+r+5, y+s+5, RGB(64+r/4, s/4, s/2+64))
Plot(x+r+5, y+s+5, ((cB)<<16)|((cG)<<8)|(cR)); (((64+r4)<<15)| ((s/4)<<7)| ((s/2+64))))
;Plot(x+6+n-r,y+6+n-s, RGB(s/4, 64+r/4, s/2+64))
Plot(x+6+n-r, y+6+n-s, ((cB)<<16)|((cR)<<8)|(cG))
Else
cR = 128+r/4
cG = s/2
cB = s/2+128
; Plot(x+r+5, y+s+5, RGB(128+r/4,s/2,s/2+128))
Plot(x+r+5, y+s+5, ((cB)<<16)|((cG)<<8)|(cR))
; Plot(x+6+n-r, y+6+n-s, RGB(s/2,128+r/4,s/2+128) )
Plot(x+6+n-r, y+6+n-s, ((cB)<<16)|((cR)<<8)|(cG))
EndIf
Next s
Next r
StopDrawing()
Repeat
Event = WaitWindowEvent()
If Event = 0
Delay(1)
EndIf
Until Event = #PB_Event_CloseWindow
Code: Alles auswählen
Img = CreateImage(#PB_Any, 500, 500)
StartDrawing(ImageOutput())
For x = 0 To 500
For y = 0 To 500
If x & y <> 0
Plot(x,y, $FF)
EndIf
Next y
Next x
StopDrawing()
OpenWindow(0, 200,200, 500,500, #PB_Window_SystemMenu, "")
CreateGadgetList(WindowID())
ImageGadget(0, 0, 0, 500, 500, UseImage(Img))
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
Code: Alles auswählen
If Event = 0
Delay(1)
EndIf