function SaveAsEpsTest
% SaveAsEpsTest checks out Screen SaveAsEps, which saves an image to disk.

% ?/??/?? ??? Wrote it
% 4/24/02 awi Exit on PC with message.

if strcmp('PCWIN',computer)
    error('Win: SaveAsEpsTest not yet supported.');
end

cd(matlabroot);
cd ..;
cd ..;
window=screen(0,'openwindow',[],offsetrect([0 0 20 10],0,650),8);
rect=Screen(window,'Rect');
oldFontSize=Screen(window,'TextSize',10);
screen(window,'PutImage',0:255,rect);
Screen(window,'DrawText','Hi',0,10,BlackIndex(window));
%delete test.eps
Screen(window,'SaveAsEps','test.eps');
% paperRect=SetRect(0,11*72,8.5*72,0);
% pageRect=rect.*[1,-1,1,-1];% convert from Apple to Adobe coordinates
% pageRect=CenterRect(pageRect,paperRect);
% Screen(window,'SaveAsEps','test.eps',rect,pageRect)
Screen(window,'Close');
