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

function eclip (epsFile,x,y,width,height)
  if nargin~=5
    usage ('eclip (epsFile,x,y,width,height)');
  end
  if width~=0
    fprintf(epsFile,'/clipPath {newpath %1.2f %1.2f moveto\n',x,y);
    fprintf(epsFile,'%1.2f %1.2f lineto\n',x+width,y);
    fprintf(epsFile,'%1.2f %1.2f lineto\n',x+width,y+height);
    fprintf(epsFile,'%1.2f %1.2f lineto closepath}def gsave clipPath clip\n',...
            x,y+height);
  else
    fprintf(epsFile,'grestore\n',x,y);
  end
