Is it possible to draw rectangles with mouse on a panel not an image?

조회 수: 6 (최근 30일)
William Sambells
William Sambells 2018년 11월 24일
편집: madhan ravi 2018년 11월 25일
Hi all,
I am currently trying to make a GUI program where users click a button which lets them draw a rectangle over a canvas (I assumed the best object to use for this was a Panel object) and I've come across,
1) Drawrectangle
2) Imrect
However they I've found that imrect is used for images reading them in with imread and drawrectangle requires axes.
Any help or advice would be appreciated.

답변 (1개)

Ka Mirul
Ka Mirul 2018년 11월 25일
편집: madhan ravi 2018년 11월 25일
I don't think so, but you can use a blank image as the background,
and you also can extract imrect position (x,y, width height ). Check it here.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by