var
i : Integer;
s :
array[0..2]
of Byte;
e :
array[0..2]
of Byte;
d :
array[0..2]
of single;
begin
s[0] := GetRValue(clred);
s[1] := GetGValue(clgreen);
s[2] := GetBValue(clblue);
e[0] := GetRValue(clred);
e[1] := GetGValue(clgreen);
e[2] := GetBValue(clblue);
for i := low(s)
to high(s)
do d[i] := (e[i]-s[i]) / Width;
for i := 0
to Width
do
begin
Form1.Canvas.Pen.Color :=
rgb( Round(s[0] + i * d[0]),
Round(s[1] + i * d[1]),
Round(s[2] + i * d[2]) );
Form1.Canvas.MoveTo(i,0);
Form1.Canvas.LineTo(i,Height);
end;