Changeset 1112 for trunk/src/mouse_up.m
- Timestamp:
- Jan 26, 2022, 7:37:21 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_up.m
r1107 r1112 363 363 RulerCoord=[AxeData.RulerCoord ;xy(1,1:2)];% append the recorded ruler origin to the current mouse coordinates 364 364 RulerCoord=diff(RulerCoord,1);% coordiante difference between segment end and beginning 365 RulerCoord=RulerCoord(1)+ i*RulerCoord(2);365 RulerCoord=RulerCoord(1)+1i*RulerCoord(2); 366 366 distance=abs(RulerCoord); 367 367 azimuth=(180/pi)*angle(RulerCoord); 368 368 msgbox_uvmat('RULER','',['length: ' num2str(distance,3) ', angle(degrees): ' num2str(azimuth,3)]) 369 if isfield(AxeData,'RulerHanle')&&~isempty(findobj(AxeData.RulerHandle)) 369 370 delete(AxeData.RulerHandle)%delete the ruler graphic object 370 371 AxeData=rmfield(AxeData,'RulerHandle');%remove the ruler handle in AxeData 372 end 371 373 AxeData.Drawing='off';%exit the ruler drawing mode 372 374 end
Note: See TracChangeset
for help on using the changeset viewer.