Own-Programming-Language-Tu.../examples/canvas/2.own
2016-02-14 21:24:06 +02:00

18 lines
258 B
Scala

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 += step {
line(0, y, w, y)
}
for x = 0, x < w, x += step {
line(x, 0, x, h)
}
repaint();