MindFusion.Wpf Pack Programmer's Guide
Utilities.PointInPolygon Method
See Also
 





Determines if the specified point is within the specified polygon.

Namespace: MindFusion
Assembly: MindFusion.Diagramming.Wpf

 Syntax

C#  Copy Code

public static bool PointInPolygon (
    Point[] poly,
    Point ptTest
)

Visual Basic  Copy Code

Public Shared Function PointInPolygon( _
    poly() As Point, _
    ptTest As Point _
) As Boolean

 Parameters

poly

ptTest

 Return Value

true if the point is inside the polygon, false if not.

 Remarks

It uses the classical polygon hit-testing algorithm: a horizontal ray starting at the point is extended infinitely rightwards and the number of polygon edges that intersect the ray are counted. If the number is odd, the point is inside the polygon.

 See Also

Utilities Members
Utilities Class
MindFusion Namespace