annotate arrows/@emousepos/emousepos.m @ 61:eff6bddf82e3
tip
Finally implemented perceptual brightness thing.
author |
samer |
date |
Sun, 11 Oct 2015 10:20:42 +0100 |
parents |
beb8a3f4a345 |
children |
|
rev |
line source |
samer@0
|
1 % emousepos - Arrow that generates mouse-move events
|
samer@0
|
2 %
|
samer@0
|
3 % emousepos ::
|
samer@0
|
4 % options {
|
samer@0
|
5 % fig :: handles / gcf ~'figure to track';
|
samer@0
|
6 % xlim :: [[1,2]] / [] ~'if not empty, set X limits of axes';
|
samer@0
|
7 % ylim :: [[1,2]] / [] ~'if not empty, set Y limits of axes'
|
samer@0
|
8 % }
|
samer@0
|
9 % -> arrow({},boxed([[2,1]]),empty).
|
samer@0
|
10 %
|
samer@0
|
11 % The output of the emousepos arrow is a stream of events carrying
|
samer@0
|
12 % two element column vectors containing the X and Y coordinates of
|
samer@0
|
13 % the last mouse-move event in the current time-slice.
|
samer@0
|
14
|
samer@0
|
15 function o=mousepos(varargin)
|
samer@37
|
16 s.opts=options('fig',[],'xlim',[],'ylim',[],varargin{:});
|
samer@0
|
17 if isempty(s.opts.fig), s.opts.fig=gcf; end
|
samer@0
|
18 o=class(s,'emousepos',arrow(0,1));
|
samer@0
|
19 end
|
samer@0
|
20
|