Mercurial > hg > ishara
view arrows/@rgbimager/construct.m @ 0:672052bd81f8
Initial partial import.
author | samer |
---|---|
date | Wed, 19 Dec 2012 22:38:28 +0000 |
parents | |
children |
line wrap: on
line source
function u=construct(s,sizes_in) figure(fig(s)); xl=s.opts.xlim; yl=s.opts.ylim; X=zeros(sizes_in{1}); if isempty(xl) && isempty(yl) h=image(X,s.opts.args{:}); else if isempty(xl) xl=[1,size(X,2)]; end if isempty(yl) yl=[1,size(X,1)]; end h=image(xl,yl,X,s.opts.args{:}); end if isfield(s.opts,'ylabel'), ylabel(s.opts.ylabel); end if isfield(s.opts,'xlabel'), xlabel(s.opts.xlabel); end u=mkunit(s); if autoflush(s), u.process =@proc_flush; else u.process=@proc_noflush; end u.sizes_out = {}; u.dispose = @()delete(h); function proc_flush(x), set(h,'CData',x); drawnow; end function proc_noflush(x), set(h,'CData',x); end end