Own-Programming-Language-Tu.../examples/canvas/2.own
2015-07-11 21:19:59 +03:00

18 lines
264 B
Plaintext

use "std"
use "canvas"
w = 800 h = 600
window("canvas example 2", w, h);
color(#ffffff)
frect(0, 0, w, h)
step = rand(20)
color(#0000ff)
for y = 0, y < h, y = y + step {
line(0, y, w, y)
}
for x = 0, x < w, x = x + step {
line(x, 0, x, h)
}
repaint();