Changeset 379 for trunk/src/mouse_motion.m
- Timestamp:
- Jan 27, 2012, 1:59:18 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_motion.m
r315 r379 42 42 test_zoom_draw=0; % test for zoom drawing 43 43 test_ruler=0;%test for active ruler 44 test_piv=0;% test for PIV correlation display44 % test_piv=0;% test for PIV correlation display 45 45 huvmat=findobj(allchild(0),'tag','uvmat');%find the uvmat interface handle 46 46 if ~isempty(huvmat) … … 58 58 test_piv=1; 59 59 end 60 % hciv=findobj(allchild(0),'tag','civ');%find the civ interface handle61 % if ~isempty(hciv) && strcmp(get(currentfig,'tag'),'view_field')62 % hhciv=guidata(hciv);63 % test_piv =get(hhciv.TestCiv1,'Value');64 % end65 60 66 61 %find the current axe 'haxes' and display the current mouse position or uicontrol tag … … 327 322 XYData=AxeData.CurrentOrigin; 328 323 if isequal(AxeData.Drawing,'create') && isfield(AxeData,'CurrentOrigin') && ~isempty(AxeData.CurrentOrigin) 329 if strcmp(ObjectData.Style,'line')||strcmp(ObjectData.Style,'polyline')||strcmp(ObjectData.Style,'polygon')||strcmp(ObjectData.Style,'points') 330 xy(1,3)=0; 331 ObjectData.Coord=[ObjectData.Coord ;xy(1,:)]; 324 if strcmp(ObjectData.Type,'line')||strcmp(ObjectData.Type,'polyline')||strcmp(ObjectData.Type,'polygon')||strcmp(ObjectData.Type,'points') 325 ObjectData.Coord=[ObjectData.Coord ;xy(1,1:2)]; 332 326 % ObjectData.Coord(end,:)=xy(1,:); 333 elseif strcmp(ObjectData. Style,'rectangle')||strcmp(ObjectData.Style,'ellipse')||strcmp(ObjectData.Style,'volume')327 elseif strcmp(ObjectData.Type,'rectangle')||strcmp(ObjectData.Type,'ellipse')||strcmp(ObjectData.Type,'volume') 334 328 ObjectData.Coord(1,1)=(xy(1,1)+XYData(1))/2;%origin rectangle, x coordinate 335 329 ObjectData.Coord(1,2)=(xy(1,2)+XYData(2))/2; 336 330 ObjectData.RangeX=abs(xy(1,1)-XYData(1))/2;%rectangle width 337 331 ObjectData.RangeY=abs(xy(1,2)-XYData(2))/2;%rectangle height 338 elseif isequal(ObjectData. Style,'plane') %case of 'plane'332 elseif isequal(ObjectData.Type,'plane') %case of 'plane' 339 333 DX=(xy(1,1)-ObjectData.Coord(1,1)); 340 334 DY=(xy(1,2)-ObjectData.Coord(1,2));
Note: See TracChangeset
for help on using the changeset viewer.