Вот как можно самому нарисовать градиент (ширина PaintBox1 = 2x256 для простоты):
Код:
type
TForm1 = class(TForm)
PaintBox1: TPaintBox;
procedure PaintBox1Paint(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.PaintBox1Paint(Sender: TObject);
var
i: Integer;
R: TRect;
begin
R:= Rect(0, 0, 1, PaintBox1.Height);
for i:= 0 to 255 do // сине->красный переход
begin
PaintBox1.Canvas.Brush.Color:= (($FF - i) shl 16) + (i);
PaintBox1.Canvas.FillRect(R);
OffsetRect(R, 1, 0);
end;
for i:= 0 to 255 do // красно->зелёный переход
begin
PaintBox1.Canvas.Brush.Color:= ($FF - i) + (i shl 8);
PaintBox1.Canvas.FillRect(R);
OffsetRect(R, 1, 0);
end;
end;