setVerticesDraggable
Set vertex behavior of ROI object
setVerticesDraggable
is not recommended. With the new Polygon
ROI, set the value of the InteractionsAllowed
property instead. For
more information, see Version History.
Description
Input Arguments
h
— ROI object
impoly
ROI object, specified as an impoly
object.
TF
— Polygon ROI vertices are draggable
true
| false
Polygon ROI vertices are draggable, specified as true
or false
.
Data Types: logical
Version History
Introduced in R2007bR2018b: setVerticesDraggable
is not recommended
Starting in R2018b, a new set of ROI objects replaces the existing set of ROI objects. The new objects provide more functional capabilities, such as face color transparency. The new classes also support events that you can use to respond to changes in your ROI such as moving or being clicked. Although there are no plans to remove the old ROI objects at this time, switch to the new ROIs to take advantage of the additional capabilities and flexibility. For more information on creating ROIs using the new ROI functions, see Create ROI Shapes.
To specify whether the vertices of a polygon are draggable, assign a value to the
InteractionsAllowed
property of the
Polygon
ROI.
Update all instances of setVerticesDraggable
method.
Discouraged Usage | Recommended Replacement |
---|---|
This example uses
imshow('cameraman.tif');
h = impoly(gca,[188,30; 189,142; 93,141]);
setVerticesDraggable(h,false);
| Here is the equivalent code, creating a
imshow('cameraman.tif'); h = drawpolygon(gca,'Position',[188,30; 189,142; 93,141]); h.InteractionsAllowed = 'none'; |
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)