Munching squares: Difference between revisions
→{{header|Julia}}: update
(→{{header|Julia}}: update) |
|||
Line 728:
=={{header|Julia}}==
<lang julia>using Gtk,
for i in 1:2:w-2, j in 1:2:h-2▼
fill(ctx)▼
end▼
const can = @GtkCanvas()
const win = GtkWindow(can, "Munching Squares",
@guarded draw(can) do widget
ctx = getgc(can)
set_source_rgb(ctx, abs(255 - x - y) / 255, ((255 - x) ⊻ y) / 255, (x ⊻ (255 - y)) / 255)
▲ fill(ctx)
▲ end
end
show(can)
const cond = Condition()
|