view arrows/@agraph/acquire.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
parents 3f77126f7b5f
children
line wrap: on
line source
function acquire(a)
	ud=get(0,'UserData');
	i=find(ud.figs==fig(a));
	if isempty(i)
		ud.figs=[ud.figs, fig(a)];
		ud.arrows=[ud.arrows,{a}];
		set(0,'UserData',ud);
	else
		fprintf('Arrow %s [%s] cannot use figure %d, already in use by %s [%s].\n',...
			tostring(a),a.opts.name,fig(a),tostring(ud.arrows{i}),ud.arrows{i}.opts.name);
		error('Figure already in use by arrow.');
	end
end