unit Rund1;

interface

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

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

var
  Form1: TForm1;
  x, y, Dicke: Integer;
  
implementation

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
begin
  x := 30;
  y := 30;
  Dicke := 180;
  Canvas.Brush.Color := clWhite;  // ansonsten Grau
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  Canvas.Ellipse (x, y, x+Dicke, y+Dicke);
end;

procedure TForm1.Button2Click(Sender: TObject);
var i: Integer; Quelle, Ziel: TRect;
begin
  for i := x-5 to ClientWidth-Dicke-x-5 do
  begin
    Quelle := Rect(i,   y-5, i+Dicke+7, y+Dicke+5);
    Ziel   := Rect(i+1, y-5, i+Dicke+7, y+Dicke+5);
    Canvas.CopyRect(Ziel, Canvas, Quelle);
    sleep (10);
  end;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  Refresh;
end;

end.
