Using LiveCode, can I visually edit the points of a polygon and can I add and delete individual points?
Asked
Active
Viewed 392 times
3 Answers
3
Yes you can. Right-click on the polygon graphic and select Reshape Polygon from the contextual menu or when it's selected choose Reshape Polygon from the object menu. Each point then gets a handle. You can create new points by option clicking and dragging a point.

Monte Goulding
- 2,380
- 1
- 21
- 25
-
Excellent - that makes things a lot easier :) – splash21 Mar 07 '13 at 20:20
2
If you don't want to edit the points visually, you can also use the fact that a polygon is defined by a cr-separated list of (x,y) points. You can edit the list by script or put the points of graphic x into a field, edit the list, then set the points of the polygon.

mwieder
- 231
- 2
- 6
2
You can also do this in script by changing the 'editmode' property of the graphic
set the editmode of graphic 1 to "polygon"
To remove the edit handles simple set the editmode back to empty:
set the editmode of graphic 1 to empty

Benjamin Beaumont
- 910
- 1
- 6
- 14