Draw a rectangle on an image in gui with mouse hover
이전 댓글 표시
This question has two parts.
First I want to draw a rectangle on an image in gui only when the mouse hovers on the image. Secondly, if the user clicks the image execute some statements. Right now, I can only draw the rectangle on the image in following manner,
axes(handles.axes1);
[r,c,~]=size(Image);
rectangle('Position', [-2,-2,c+4,r+4],'EdgeColor','r');
댓글 수: 3
Geoff Hayes
2019년 1월 11일
Imran - do you want to click the mouse button (while the mouse pointer is over the image) and draw the rectangle from that location? What is the relationship between the mouse pointer and the rectangle?
Abdulllah
2019년 1월 11일
Abdulllah
2019년 1월 11일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
