06.08.2013 Views

内容简介作者简介 - 科学与工程计算系

内容简介作者简介 - 科学与工程计算系

内容简介作者简介 - 科学与工程计算系

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

function textzzy(arg)<br />

% textzzy.m<br />

%<br />

%<br />

if ~nargin;arg=0;end<br />

if ischar(arg)|iscell(arg)<br />

PT.Units='normalized';<br />

PT.Position=[0.01 0.01];<br />

PT.String=arg;<br />

PT.HorizontalAlignment='left';<br />

PT.VerticalAlignment='baseline';<br />

ht=text(PT);<br />

textzzy(0)<br />

elseif arg==0<br />

hf=get(0,'CurrentFigure');<br />

if isempty(hf)<br />

error('图形窗不存在。')<br />

end<br />

PF1.BackingStore='off';<br />

PF1.WindowButtonDownFcn='textzzy(1)';<br />

set(hf,PF1)<br />

figure(hf)<br />

elseif arg==1 & strcmp(get(gco,'Type'),'text')<br />

PO1.Units='data';<br />

PO1.EraseMode='xor';<br />

PO1.HorizontalAlignment='left';PO1.VerticalAlignment='baseline';<br />

set(gco,PO1)<br />

PF2.Pointer='fleur';<br />

PF2.WindowButtonMotionFcn='textzzy(2)';<br />

PF2.WindowButtonUpFcn='textzzy(999)';<br />

set(gcf,PF2)<br />

elseif arg==2<br />

curpoi=get(gca,'CurrentPoint');<br />

set(gco,'Position',curpoi(1,1:3))<br />

elseif arg==999<br />

set(gco,'EraseMode','normal')<br />

PF3.WindowButtonDownFcn='';<br />

PF3.WindowButtonMotionFcn='';<br />

PF3.WindowButtonUpFcn='';<br />

PF3.Pointer='arrow';<br />

PF3.Units='pixels';<br />

PF3.BackingStore='on';<br />

set(gcf,PF3)<br />

else<br />

PF4.WindowButtonDownFcn='';<br />

PF4.WindowButtonMotionFcn='';<br />

PF4.WindowButtonUpFcn='';<br />

PF4.Pointer='arrow';<br />

PF4.Units='pixels';<br />

PF4.BackingStore='on';<br />

set(gcf,PF4)<br />

14

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!