unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Buttons;
type
{ TForm1 }
TForm1 = class(TForm)
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Image1: TImage;
PaintBox1: TPaintBox;
procedure BitBtn1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
//Schlange
type
TPunkt = class
private
public
procedure paint(xWert, yWert:integer);
end;
var
Form1: TForm1;
xWert: integer;
yWert: integer;
punkt: TPunkt;
Paintbox1 : TPaintbox;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
//Logo
Image1.Picture.LoadFromFile('Logo.jpg');
end;
procedure TPunkt.paint(xWert, yWert: integer);
begin
Paintbox1.Canvas.Pen.Width:= 10;
Paintbox1.Canvas.Pen.Color:=clLime;
Paintbox1.Canvas.MoveTo(xWert,yWert);
Paintbox1.Canvas.LineTo(xWert,yWert);
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
var xWert, yWert: integer;
begin
punkt:=TPunkt.create;
xWert:=10;
yWert:=10;
punkt.paint(xWert, yWert);
end;
end.