CPolygon:DeletePt
The DeletePt function deletes a point from the CPolygon and closes the hole with the point indices above it. If the index is outside the range [1, CPolygon:Count()], the method fails.
bSuccess = CPolygon:DeletePt( nIndex ) where |
nIndex is the index where to delete the point.
bSuccess is the returned success code. On success it is true, otherwise false.
The following script creates a CPolygon object and then deletes the point at index 5.
|
|
|
-- create a CPolygon with 6 points |
|
-- result: [5] = 3,8 |
|
-- result: Count = 6 |
|
|
|
-- delete at index [5] |
|
|
|
-- result: [5] = 4,9 |
|
-- result: Count = 5 |
|
|