Utility.PointInPolygon (Point2D, IList<Point2D>) Method

Tests if a 2D point is inside a 2D polygon.
Public Shared Function PointInPolygon( _ 
ByVal testPoint As Point2D, _ 
ByVal polygon As IList(Of Point2D) _ 
) As Boolean
This language is not supported or no code example is available.
public static bool PointInPolygon( 
Point2D testPoint
IList<Point2D> polygon 
)
This language is not supported or no code example is available.

Parameters

testPoint
Point2D

The test 2D point

polygon
IList<Point2D>

The polygon

Return Value

bool

True if the 2D point is inside, false if the point is outside. For points on the edges of the polygon, please use PointInPolygon

Remarks
 
The polygon must be closed, so the first and last points of the list must be coincident.

.NET Framework

Supported in: 4.8

In this article

Definition