ArcGIS Explorer Component Help |
Polygon..::.InsertPoint Method (Int32, Int32, Point) |
Polygon Class See Also |
Assembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public void InsertPoint( int ringIndex, int pointIndex, Point pt ) |
Visual Basic (Declaration) |
---|
Public Sub InsertPoint ( _ ringIndex As Integer, _ pointIndex As Integer, _ pt As Point _ ) |
Parameters
- ringIndex
- Type: System..::.Int32
The index of the ring to copy the new Point into.
- pointIndex
- Type: System..::.Int32
The point index within the specified ringIndex to copy the new Point into.
- pt
- Type: ESRI.ArcGISExplorer.Geometry..::.Point
The Point to copy into the Polygon.
Remarks
Use this method to insert a new Point into an existing ring of a multipart Polygon; the inserted point will have the specified pointIndex and all following points in the ring will increase their index position by 1. If the pointIndex is equal to the number of points, this method behaves like the AddPoint method, copying the Point after all existing points in the specified ring. The specified ringIndex must already exist in the Polygon.
If working with single part polygons, the InsertPoint(Int32, Point) overload is also available.
Note that the CoordinateSystem property of any new points added, inserted or set into existing an existing Polygon or Polyline will be discarded, and the coordinates (X and Y properties) of the point assumed to be in the same CoordinateSystem as the Polygon or Polyline to which they are added.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentOutOfRangeException | The specified pointIndex must not be greater than the number of existing points in the specified ring, and the specified ringIndex must already exist in the Polygon. |
System..::.InvalidOperationException | A Point cannot be inserted into an empty Polygon. |