# EditPolygon

Inserts an interactive polygon control into the spreadsheet. When first inserted into a cell, the property sheet of the function is displayed. Select the Edit Graphics menu option and enter Polygon Regions Interactive Graphics Mode.

Note: To access the Property Sheet for the EditPolygon function after it has been configured, right-click the Polygon data structure and select Edit Function. Double-clicking the Polygon data structure switches the display to Polygon Regions Interactive Graphics Mode, where the polygon can be graphically modified.

## EditPolygon Inputs

### General Tab

Parameter | Description
Image | This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references A0, the cell containing the Image data structure returned by AcquireImage function. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image Functions or Coordinate Transforms Functions.
Fixture | Specifies the image coordinate system in which the input polygon is defined.
X | The X-offset of the origin, in fixture coordinates.
Y | The Y-offset of the origin, in fixture coordinates.
Theta | The rotation from the image X-axis, in the image coordinate system. (+/-360 degrees clockwise)
Add Points | If checked (default), points can be added to the polygon during graphical editing.
Remove Points | If checked (default), points can be removed from the polygon during graphical editing.
Move Points | If checked (default), points can be moved within the polygon during graphical editing.
Move Entire Polygon | If checked (default), the entire polygon can be moved during graphical editing.
Scale | If checked (default), the polygon can be scaled during graphical editing.
Rotate | If checked (default), the polygon can be rotated during graphical editing.
Name | Specifies a text label for the EditPolygon control element in the spreadsheet.
Show | Specifies the display mode for the EditPolygon graphics overlay on the image.
0 = hide all | The polygon is hidden, except when the cell containing the EditPolygon function is highlighted in the spreadsheet.
2 = input graphics only | The polygon is displayed at all times.

### Points Tab

The Points tab of the EditPolygon function is comprised of a table that lists the number of points, and their X/Y location, which can be manually specified in the table. Press Insert to add points.

By default, the polygon shape is comprised of three points. The Remove button is enabled if there are more than three points, and is used to remove a point from the polygon.

## EditPolygon Outputs

Results | A Polygon data structure.