

{ schak_aan(10,10,100,40,'FILE',0); }

procedure schak_aan(x,y,xx,yy :integer;tekst :string;rand :byte);

var
  hor,ver :real;

begin
  setfillstyle(1,7);bar(x,y,xx,yy);
  setcolor(8);
  for p :=0 to rand do line(x+p,y+p,xx-p,y+p);
  for p :=0 to rand do line(xx-p,y+p,xx-p,yy-p);
  setcolor(15);
  for p :=0 to rand do line(x+p,yy-p,xx-p,yy-p);
  for p :=0 to rand do line(x+p,y+p,x+p,yy-p);
  setcolor(8);
  settextstyle(2,0,6);
  hor :=((xx-x)/2)+x-(length(tekst)*10)/2;ver :=((yy-y)/2)+y-4;
  outtextxy(round(hor),round(ver)-5,tekst);
  outtextxy(round(hor)+1,round(ver)-5,tekst);
  settextstyle(0,0,0);
end;
