Share via


Stroke.NearestPoint Method (Point)

Returns the location on the Stroke object nearest to a specified Point.

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)

Syntax

'Declaration
Public Function NearestPoint ( _
    pt As Point _
) As Single
'Usage
Dim instance As Stroke
Dim pt As Point
Dim returnValue As Single

returnValue = instance.NearestPoint(pt)
public float NearestPoint (
    Point pt
)
public:
float NearestPoint (
    Point pt
)
public float NearestPoint (
    Point pt
)
public function NearestPoint (
    pt : Point
) : float
Not applicable.

Parameters

  • pt
    The specified point, in ink space coordinates.

Return Value

Returns the location on the Stroke object nearest to a specified Point.

Example

This C# example returns the nearest location on the Stroke object, theStroke, to the Point, theInkSpacePoint.

float theFIndex = theStroke.NearestPoint(theInkSpacePoint);

This Microsoft® Visual Basic® .NET example returns the nearest location on the Stroke object, theStroke, to the Point, theInkSpacePoint.

Dim theFIndex As Single = theStroke.NearestPoint(theInkSpacePoint)

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

Stroke Class
Stroke Members
Microsoft.Ink Namespace
Microsoft.Ink.Ink.NearestPoint
Microsoft.Ink.Ink.HitTest
Stroke.GetRectangleIntersections