unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,Math;
type
TForm1 =
class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
type
TMann2 =
class
xpos,ypos : integer ;
constructor create(Mx,My :integer);
procedure Normal;
end;
var
Form1: TForm1;
Mann2: TMann2;
implementation
{$R *.dfm}
procedure TMann2.Normal;
begin
Form1.Canvas.Ellipse(xpos-10,ypos,xpos+10,ypos+20);
Form1.Canvas.Moveto(xpos,ypos+20);
Form1.Canvas.LineTo(xpos,ypos+50);
Form1.Canvas.LineTo(xpos+10,ypos+70);
Form1.Canvas.Moveto(xpos,ypos+50);
Form1.Canvas.LineTo(xpos-10,ypos+70);
Form1.Canvas.Moveto(xpos,ypos+25);
Form1.Canvas.LineTo(xpos-5,ypos+45);
Form1.Canvas.Moveto(xpos,ypos+25);
Form1.Canvas.LineTo(xpos+5,ypos+45);
end;
constructor TMann2.create (Mx,My:integer);
begin
xpos:=Mx;
ypos:=My;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Mann2:=TMann2.create(400,300);
Mann2.Normal;
end;
end.