View.Set ("graphics:250;250")
proc drawBox (x1, y1, x2, y2, c, a : int)
var alpha1 : real := a / 100
var alpha2 : real := 1 - alpha1
var r1, g1, b1, r2, g2, b2 : real
for x : x1 .. x2
for y : y1 .. y2
RGB.GetColor (c, r1, g1, b1)
RGB.GetColor (whatdotcolor (x, y), r2, g2, b2)
r1 := r1 * alpha1 + r2 * alpha2
g1 := g1 * alpha1 + g2 * alpha2
b1 := b1 * alpha1 + b2 * alpha2
Draw.Dot (x, y, RGB.AddColor (r1, g1, b1))
end for
end for
end drawBox
for i : 1 .. 7
Draw.FillBox (Rand.Int (1, maxx), Rand.Int (1, maxy), Rand.Int (1, maxx), Rand.Int (1, maxy), Rand.Int (1, maxcolor))
end for
drawBox (1, maxy div 2, maxx div 2, maxy, 7, 5)
drawBox (1, 1, maxx div 2, maxy div 2, 7, 25)
drawBox (maxx div 2, 1, maxx, maxy div 2, 7, 50)
drawBox (maxx div 2, maxy div 2, maxx, maxy, 7, 75) |