Polygon AddVertex Method Cognex VisionPro 9.21 SR1

Add a vertex to the polygon. If the default index -1 is used, the new vertex will be added to the end of any existing vertices. Otherwise Index must be >= 0 and <= NumVertices.

Namespace: Cognex.Vision
Assembly: Cognex.Vision.Core.Net (in Cognex.Vision.Core.Net.dll) Version: 9.21.1.1
Syntax

public void AddVertex(
	double x,
	double y,
	int index
)
Exceptions

ExceptionCondition
ArgumentExceptionindex < -1
ArgumentExceptionindex > NumVertices
OutOfMemoryExceptionThe memory to store the vertices cannot be allocated.
Remarks

Changed Raised when the number of vertices changes.

Remarks

Add a vertex to the polygon at the given index. If index is -1 or NumVertices, the vertex is added to the end.

See Also