Changeset 622 for trunk/src/view_field.m


Ignore:
Timestamp:
Apr 29, 2013, 11:35:27 AM (11 years ago)
Author:
sommeria
Message:

mouse system for uvmat imrpoved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/view_field.m

    r612 r622  
    363363% set(handles.RunMovie,'BackgroundColor',[1 0 0])%paint the command buttonback to red
    364364
    365 
    366 %-------------------------------------------------------------------
     365%------------------------------------------------------------------------
    367366% --- translate coordinate to matrix index
    368 %-------------------------------------------------------------------
     367%------------------------------------------------------------------------
    369368function [indx,indy]=pos2ind(x0,rangx0,nxy)
    370369indx=1+round((nxy(2)-1)*(x0-rangx0(1))/(rangx0(2)-rangx0(1)));% index x of pixel 
    371370indy=1+round((nxy(1)-1)*(y12-rangy0(1))/(rangy0(2)-rangy0(1)));% index y of pixel
    372371
    373 %-------------------------------------------------------------------
    374 % --- Executes on button press in 'zoom'.
    375 %-------------------------------------------------------------------
     372%------------------------------------------------------------------------
     373% --- Executes on button press in 'CheckZoom'.
     374%------------------------------------------------------------------------
    376375function CheckZoom_Callback(hObject, eventdata, handles)
    377 if (get(handles.CheckZoom,'Value') == 1);
    378     set(handles.CheckZoom,'BackgroundColor',[1 1 0])
     376
     377if get(handles.CheckZoom,'Value')
    379378    set(handles.CheckFixLimits,'Value',1)% propose by default fixed limits for the plotting axes
    380     set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
    381 else
    382     set(handles.CheckZoom,'BackgroundColor',[0.7 0.7 0.7])
     379    set(handles.CheckZoomFig,'Value',0)%desactivate zoom fig
     380end
     381
     382%------------------------------------------------------------------------
     383% --- Executes on button press in CheckZoomFig.
     384%------------------------------------------------------------------------
     385function CheckZoomFig_Callback(hObject, eventdata, handles)
     386
     387if get(handles.CheckZoomFig,'Value')
     388    set(handles.CheckZoom,'value',0)
    383389end
    384390
     
    839845% % eventdata  reserved - to be defined in a future version of MATLAB
    840846% % handles    structure with handles and user data (see GUIDATA)
     847
     848
     849
     850
Note: See TracChangeset for help on using the changeset viewer.