%erect ( epsFile , x , y , width , height , lineWidth, color)
% written by Stefan Mueller stefan.mueller@fgan.de 1997

function erect(epsFile,x,y,width,height,lineWidth,color)
  if (nargin~=7)
    usage ('erect ( epsFile , x , y , width , height , lineWidth , color)');
  end
  fprintf(epsFile,'%1.2f %1.2f %1.2f setrgbcolor\n',...
                   color(1),color(2),color(3));
  fprintf(epsFile,'newpath\n');
  fprintf(epsFile,'%1.2f %1.2f moveto\n',x,y);
  fprintf(epsFile,'%1.2f %1.2f rlineto\n',width,0);
  fprintf(epsFile,'%1.2f %1.2f rlineto\n',0,height);
  fprintf(epsFile,'%1.2f %1.2f rlineto\n',-width,0);
  fprintf(epsFile,'%1.2f %1.2f rlineto\n',0,-height);
  fprintf(epsFile,'closepath\n');
  fprintf(epsFile,'%1.2f setlinewidth\n',lineWidth);
  fprintf(epsFile,'stroke\n');
