GoDiagram Web Reference
GetSegmentNearPoint Method (GoPolygon)

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
Return the index of the first point of a segment of this polygon that is close to a given point.
Syntax
'Declaration
 
Public Function GetSegmentNearPoint( _
   ByVal pnt As PointF, _
   ByVal pickMargin As Single _
) As Integer
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, ....
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoPolygon Class
GoPolygon Members

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback