GoDiagram Web Reference
NearestPointOnLine Method

One end of the line.
The other end of the line.
The point to be closest to.
A PointF that is on the finite length straight line segment from a to b
Return a point on a straight line segment that is closest to a given point.
Syntax
'Declaration
 
Public Shared Function NearestPointOnLine( _
   ByVal a As PointF, _
   ByVal b As PointF, _
   ByVal p As PointF, _
   ByRef result As PointF _
) As Boolean
public static bool NearestPointOnLine( 
   PointF a,
   PointF b,
   PointF p,
   out PointF result
)

Parameters

a
One end of the line.
b
The other end of the line.
p
The point to be closest to.
result
A PointF that is on the finite length straight line segment from a to b

Return Value

true if the point p is on a perpendicular line to the line segment; false if the point p is beyond either end of the line segment. When this returns false, the result will be either a or b.
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

GoStroke Class
GoStroke Members

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback