GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoPolygon Class / GetSegmentNearPoint Method
A PointF in document coordinates
the approximate distance from each line segment that is allowed, in addition to the width of the Pen; assumed to be non-negative
In This Topic
    GetSegmentNearPoint Method (GoPolygon)
    In This Topic
    Return the index of the first point of a segment of this polygon that is close to a given point.
    Syntax
    public int GetSegmentNearPoint( 
       PointF pnt,
       float pickMargin
    )

    Parameters

    pnt
    A PointF in document coordinates
    pickMargin
    the approximate distance from each line segment that is allowed, in addition to the width of the Pen; assumed to be non-negative

    Return Value

    The zero-based index of the first point of a segment, or -1 if no segment is near pnt.
    Remarks
    This ignores the filled area and only considers the boundary defined by the polygon points that is drawn by the Pen (or if there is no Pen, what would be drawn if there were a Pen). For Bezier style polygons, this returns the index of the first of each set of points, e.g. 0, 3, 7, ....
    See Also