Changeset 699 for trunk/src


Ignore:
Timestamp:
Dec 12, 2013, 3:58:02 PM (11 years ago)
Author:
sommeria
Message:

mouse indication improved

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/geometry_calib.m

    r698 r699  
    978978set(handles.APPLY,'BackgroundColor',[1 0 1])
    979979
    980 figure(10)
    981 hold off
    982 imagesc(Amod)
    983 hold on
    984 plot(Tmod(:,1),Tmod(:,2),'+')
     980% figure(10)
     981% hold off
     982% imagesc(Amod)
     983% hold on
     984% plot(Tmod(:,1),Tmod(:,2),'+')
    985985
    986986
     
    12381238hh=findobj('Tag','calib_points');
    12391239if  ~isempty(Coord) && isempty(hh)
    1240     hh=line(Coord_plot(:,1),Coord_plot(:,2),'Color','m','Tag','calib_points','LineStyle','.','Marker','+');
     1240    hh=line(Coord_plot(:,1),Coord_plot(:,2),'Color','m','Tag','calib_points','LineStyle','.','Marker','+','MarkerSize',10);
    12411241elseif isempty(Coord)%empty list of points, suppress the plot
    12421242    delete(hh)
  • trunk/src/mouse_motion.m

    r693 r699  
    109109    test_zoom_draw=test_draw && isequal(AxeData.Drawing,'zoom')&& isfield(AxeData,'CurrentOrigin') && isequal(get(gcf,'SelectionType'),'normal');
    110110    test_object=test_draw && isfield(AxeData,'CurrentObject') && ~isempty(AxeData.CurrentObject) && ishandle(AxeData.CurrentObject);
    111     if ~test_edit_object  && ~test_ruler && ~CheckZoom
    112         pointershape='crosshair';%set pointer with cross shape (default when mouse is over an axis)
     111    if ~test_edit_object  && ~test_ruler
     112        if CheckZoom
     113           pointershape='zoom';
     114        elseif CheckZoomFig
     115            pointershape='zoomfig';
     116        elseif test_draw
     117            pointershape='crosshair';%set pointer with cross shape (default when mouse is over an axis)
     118        else
     119        pointershape='fullcross';%set pointer with cross shape (default when mouse is over an axis)
     120        end
    113121    end
    114122    FigData=get(hCurrentFig,'UserData');
     
    445453
    446454%% update the mouse pointer
     455if strcmp(pointershape,'zoom')||strcmp(pointershape,'zoomfig')
     456    CData=set_pointershape(pointershape);
     457    set(hCurrentFig,'Pointer','custom','PointerShapeCData',CData,'PointerShapeHotSpot',[9 9])
     458else
    447459set(hCurrentFig,'Pointer',pointershape);
     460end
     461
     462function CData=set_pointershape(pointershape)
     463        CData=ones(16,16);
     464        [ind_x,ind_y]=meshgrid([1:16],[1:16]);
     465        if strcmp(pointershape,'zoom')
     466        radius=(ind_x-9).*(ind_x-9)+(ind_y-8.5).*(ind_y-9);
     467        CData(radius<25 & radius>16)=2; %make white circle
     468        CData(radius<16 | radius>40)=NaN; %make the centre transparent
     469        CData(16,16)=1; CData(15,16)=2;
     470        CData(15,15)=1; CData(14,15)=2;
     471        CData(14,14)=1; CData(13,14)=2;
     472        CData(13,13)=1; CData(12,13)=2;
     473        elseif strcmp(pointershape,'zoomfig')
     474            CData(:,1:3)=2;
     475            CData(:,14:16)=2;
     476                        CData(1:3,:)=2;
     477            CData(14:16,:)=2;
     478            CData(CData==1)=NaN;
     479        end
  • trunk/src/mouse_up.m

    r682 r699  
    3939    testsubplot=0;
    4040end
     41%set(get(hcurrentfig,'CurrentObject'),'Selected','off')
     42
    4143CurrentOrigin=[];
    4244if isfield(AxeData,'CurrentOrigin')
     
    5759    return
    5860end
     61
    5962xy=get(hcurrentaxes,'CurrentPoint');%xy(1,1),xy(1,2): current x,y positions in axes coordinates
    6063
     
    6366if ~isempty(huvmat) && isfield(AxeData,'Drawing') && ~isequal(AxeData.Drawing,'off') && isfield(AxeData,'CurrentObject')...
    6467        && ~isempty(AxeData.CurrentObject) && ishandle(AxeData.CurrentObject)
     68    set(AxeData.CurrentObject,'Selected','off')
    6569    PlotData=get(AxeData.CurrentObject,'UserData');%get data attached to the current projection object
    6670    IndexObj=PlotData.IndexObj;
  • trunk/src/uvmat.m

    r693 r699  
    28252825function CheckZoom_Callback(hObject, eventdata, handles)
    28262826
    2827 if get(handles.CheckZoom,'Value')
    2828     set(handles.CheckFixLimits,'Value',1)% propose by default fixed limits for the plotting axes
    2829     set(handles.CheckZoomFig,'Value',0)%desactivate zoom fig
    2830 end
     2827    if get(handles.CheckZoom,'Value')
     2828        set(handles.CheckFixLimits,'Value',1)% propose by default fixed limits for the plotting axes
     2829        set(handles.CheckZoomFig,'Value',0)%desactivate zoom fig
     2830    end
     2831
    28312832
    28322833%------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.