delete drawn shape from image
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
mary
am 2 Jun. 2011
Kommentiert: Himanshu Giria
am 5 Jan. 2021
hi,
I have drawn several ellipses using imellipse instruction on an image in a figure. when i choose one of those ellipses and wanna delete it using 'delete' key, it doesn't work. how can i do it? tnx
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 2 Jun. 2011
gco() should return the handle of the currently selected object. Selecting is just a matter of clicking (once) on the object. Recognizing the delete key would be done by setting KeyPressFcn callback for the figure: be sure to check the event data to be sure the proper key was pressed. It might also be a good idea to get() the Type of the current object and check it, so that you only delete the kind of objects you want.
2 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!