j'éssais de créer un générateur de Zebra mais cela ne fonctionne pas

Code : Tout sélectionner
If OpenWindow(0, 0, 0, 400, 200, "Line", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If CreateImage(0, 400, 200) And StartDrawing(ImageOutput(0))
;Box(0, 0, 400, 200, #Black)
clr2=#Yellow
clr1=#Red ;#Black
For ln=1 To 360; Step 20
For x = 1 To 20
Swap clr1, clr2
LineXY(x+ln,1,x+ln+40,200,clr1)
Next x
Next ln
StopDrawing()
ImageGadget(0, 0, 0, 400, 200, ImageID(0))
EndIf
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
