| Image Processing Toolbox™ | ![]() |
fcn = makeConstrainToRectFcn(type, xlim, ylim)
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].
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);
impoint, imrect, imline, imdistline
![]() | makecform | makehdr | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |