CPolygon:GetPt
The GetPt method returns the x,y values for a vertex of the CPolygon.
x, y = CPolygon:GetPt( nIndex ) where |
nIndex is the index of the target vertex, between 1 and Count.
x, y are the coordinates of the point at index nIndex.
The following script creates a CPolygon from 2 arrays and returns the coordinates of the specified vertex:
|
-- create CPolygon A |
|
-- specify an index |
|
-- result: pt[3] = 6,-3 |