How to limit the movement of a rectangle?
Mostra commenti meno recenti
I use RectangleMovingEvent.
But I want to move the rectangle only vertically.
So I changed the values of PreviousPosition and CurrentPosition, but they are the same.
How do I limit the movement of the rectangle ??
roi = drawrectangle('Position',p ,'Color',[1 0 0]);
addlistener(roi, 'MovingROI', @(a, b)roi_moved(a, b, handles));
function roi_moved(hObject, eventdata, handles)
p = hObject.Position;
Risposta accettata
Più risposte (1)
Stijn Haenen
il 14 Nov 2019
Maybe you can use the function:
get(roi,'position')
But i'm not sure what you want.
1 Commento
BoSeon Kang
il 14 Nov 2019
Categorie
Scopri di più su ROI-Based Processing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!