Скачиваний:
10
Добавлен:
15.06.2014
Размер:
2.82 Кб
Скачать
unit UFACE;

interface

uses Graphics,UKVAD;

Type TFACE=Class(TKVAD)
EyeColor:TColor;
HeightEye1,HeightEye2:byte;
xi:integer;
Constructor Create(x0,y0:integer;Canvas0:TCanvas);
procedure Show; override;
procedure Levo;
procedure Pravo;
procedure NormEyes;
end;

implementation

Constructor TFACE.Create;
begin
Inherited Create(x0,y0,30,clYellow,Canvas0);
NormEyes
end;

procedure TFACE.NormEyes;
begin
EyeColor:=clBlue;
HeightEye1:=3; HeightEye2:=3;
Show;
end;

procedure TFACE.Show;
var
xi,yi,h,i:integer;
begin
Inherited Show;
For i:=1 to 2 do begin
case i of
1: begin
xi:=x-15;
h:=HeightEye1;
end;
2: begin
xi:=x+15;
h:=HeightEye2;
end;
end;
yi:=y-10;
Canvas.Ellipse(xi-10,yi-h,xi+10,yi+h);
end;

For i:=1 to 2 do begin
case i of
1: begin
xi:=x-15;
h:=HeightEye1;
end;
2: begin
xi:=x+15;
h:=HeightEye2;
end;
end;
yi:=y-10;
Canvas.Ellipse(xi-2,yi-2,xi+2,yi+2);
end;
Canvas.Arc(x-20,y-25,x+20,y+15,x-25,y+10,x+25,y+10);
end;

procedure TFACE.Levo;
var
xi,yi,h,i:integer;
begin
Canvas.Pen.Color:=clYellow;
Canvas.Brush.Color:=clYellow;
For i:=1 to 2 do begin
case i of
1: begin
xi:=x-15;
h:=HeightEye1;
end;
2: begin
xi:=x+15;
h:=HeightEye2;
end;
end;
yi:=y-10;
Canvas.Ellipse(xi-1,yi-2,xi+5,yi+2);
end;
For i:=1 to 2 do begin
case i of
1: begin
xi:=x-15;
h:=HeightEye1;
end;
2: begin
xi:=x+15;
h:=HeightEye2;
end;
end;
yi:=y-10;
Canvas.Ellipse(xi-2,yi-2,xi+2,yi+2);
end;
Canvas.Pen.Color:=clRed;
Canvas.Brush.Color:=clRed;
For i:=1 to 2 do begin
case i of
1: begin
xi:=x-15;
h:=HeightEye1;
end;
2: begin
xi:=x+15;
h:=HeightEye2;
end;
end;
yi:=y-10;
Canvas.Ellipse(xi-5,yi-2,xi+1,yi+2);
end;
end;

procedure TFACE.Pravo;
var
xi,yi,h,i:integer;
begin
Canvas.Pen.Color:=clYellow;
Canvas.Brush.Color:=clYellow;
For i:=1 to 2 do begin
case i of
1: begin
xi:=x-15;
h:=HeightEye1;
end;
2: begin
xi:=x+15;
h:=HeightEye2;
end;
end;
yi:=y-10;
Canvas.Ellipse(xi-5,yi-2,xi+1,yi+2);
end;

Canvas.Pen.Color:=clRed;
Canvas.Brush.Color:=clRed;
For i:=1 to 2 do begin
case i of
1: begin
xi:=x-15;
h:=HeightEye1;
end;
2: begin
xi:=x+15;
h:=HeightEye2;
end;
end;
yi:=y-10;
Canvas.Ellipse(xi-1,yi-2,xi+5,yi+2);
end;

end;
end.
Соседние файлы в папке Квадратные лица
  • #
    15.06.20141.1 Кб10Project1.dof
  • #
    15.06.2014238 б11Project1.dpr
  • #
    15.06.2014876 б11Project1.res
  • #
    15.06.2014213 б10Project1.~dpr
  • #
    15.06.20142.94 Кб10UFACE.dcu
  • #
    15.06.20142.82 Кб10UFACE.pas
  • #
    15.06.20141.36 Кб10UFACE.~pas
  • #
    15.06.20141.73 Кб10UKVAD.dcu
  • #
    15.06.2014734 б10UKVAD.pas
  • #
    15.06.2014730 б10UKVAD.~pas
  • #
    15.06.20146.39 Кб10Unit1.dcu