Products & Services Industries Academia Support User Community Company

Learn more about Image Processing Toolbox   

makeConstrainToRectFcn - Create rectangularly bounded drag constraint function

Syntax

fcn = makeConstrainToRectFcn(type, xlim, ylim)

Description

fcn = makeConstrainToRectFcn(type, xlim, ylim) creates a drag constraint function for draggable tools of a given type, where type is the string: 'impoint', 'imline', or 'imrect'. The rectangular boundaries of the drag constraint function are described by the vectors xlim and ylim where xlim = [xmin xmax] and ylim = [ymin ymax].

Examples

Constrain drag of impoint within axes limits.

figure, plot(1:10);
h = impoint(gca,2,6);
fcn = makeConstrainToRectFcn('impoint',get(gca,'XLim'),...
		get(gca,'YLim'));
setPositionConstraintFcn(h,fcn);

See Also

impoint, imrect, imline, imdistline

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS