(Gast)
n/a Beiträge
|
Re: Farbauswahl
22. Aug 2003, 11:35
codevorschlag:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
const
step = 25;
lines = 1;
var
r, g, b, x: integer
begin
PaintBox1.Width := (255 div step)*(255 div step)*(255 div step) mod lines;
PaintBox1.Height := 5*(lines + 1);
x := 0;
for r := 0 to 255 div step do
for g := 0 to 255 div step do
for b := 0 to 255 div step do
with PaintBox1 do begin
inc(x);
Canvas.Brush.Color := RGB(r*step, g*step, b*step);
Canvas.Pen.Color := RGB(r*Step, g*step, b*step);
Canvas.MoveTo(x mod lines, x div lines);
Canvas.LineTo(x mod lines, x div lines + 5);
end;
end;
müsste theoretisch funzen
|
|
Zitat
|