# EditPolygon

Inserts an interactive polygon control into the spreadsheet. When first inserted into a cell, the function's property sheet will be 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 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 will be hidden, except when the cell containing the EditPolygon function is highlighted in the spreadsheet.
2 = input graphics only | The polygon will be 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 the Insert button 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.