Quote:
var newColor := RGB.AddColor (1.0, 1.0, 0.0)
for x : 1 .. maxx by 30
for y : 1 .. maxy by 30
Draw.FillOval (x, y, Rand.Int (10, 100), Rand.Int (10, 100), Rand.Int (1, maxcolor))
end for
end for
var x1, x2, y1, y2 := 0
var R, G, B, R2, G2, B2 : real
x1 := 1
x2 := maxx
y1 := 1
y2 := maxy
var col : array 1 .. maxx, 1 .. maxy of int
for x : x1 .. x2
for y : y1 .. y2
col (x, y) := whatdotcolor (x, y)
end for
end for
cls
for x : x1 .. x2
for y : y1 .. y2
Draw.Dot (x, y, Rand.Int (1, maxcolor))
end for
end for
for x : x1 .. x2
for y : y1 .. y2
RGB.GetColor (col (x, y), R, G, B)
RGB.GetColor (whatdotcolor (x, y), R2, G2, B2)
Draw.Dot (x, y, RGB.AddColor ((R + R2) / 2, (G + G2) / 2, (B + B2) / 2))
end for
end for