Code: Select all
If OpenWindow(0, 0, 0, 200, 200, "2DDrawing Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If StartDrawing(WindowOutput(0))
y = 0
For x = 0 To 95 Step 10
Box(x, y, 200-2*x, 200-2*y, RGB(Random(255), Random(255), Random(255)))
y + 10 ; the same as y = y + 10
Next x
StopDrawing()
EndIf
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf