unit Linien4A;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

const
  FMax = 16;
  Farbe: Array[0..FMax-1] of TColor =
   (clBlack, clMaroon, clGreen, clNavy, clTeal, clPurple,
    clOlive, clGray, clSilver, clRed, clLime, clBlue,
    clAqua, clFuchsia, clYellow, clWhite);
  
var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var i: Integer;
begin
  // Bunte Ellipsen
  for i := -66 to 111 do
  begin
    Canvas.Pen.Color := Farbe[random(FMax)];
    Canvas.Ellipse (i*2, i, ClientWidth-i*2, ClientHeight-i);
  end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  randomize;
end;

end.
