Stroke.HitTest Method
Returns a value that indicates whether a Stroke object is either completely inside or intersected by a given circle.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)
Syntax
'Declaration
Public Function HitTest ( _
pt As Point, _
radius As Single _
) As Boolean
'Usage
Dim instance As Stroke
Dim pt As Point
Dim radius As Single
Dim returnValue As Boolean
returnValue = instance.HitTest(pt, radius)
public bool HitTest (
Point pt,
float radius
)
public:
bool HitTest (
Point pt,
float radius
)
public boolean HitTest (
Point pt,
float radius
)
public function HitTest (
pt : Point,
radius : float
) : boolean
Not applicable.
Parameters
- pt
The center of the hit test circle, in ink space coordinates.
- radius
The radius of the hit test circle.
Return Value
Whether a Stroke object is either completely inside or intersected by a given circle.
Value |
Meaning |
---|---|
true |
The Stroke object is either completely inside or intersected by the circle. |
false |
The Stroke object is completely outside the circle. |
Example
This C# example returns a value that indicates whether any part of the Stroke object, theStroke
, is within the distance, theRadius
, of a Point, thePoint
, which is in ink space coordinates.
bool isAHit = theStroke.HitTest(thePt, theRadius);
This Microsoft® Visual Basic® .NET example returns a value that indicates whether any part of the Stroke object, theStroke
, is within the distance, theRadius
, of a Point, thePoint
, which is in ink space coordinates.
Dim isAHit As Boolean = theStroke.HitTest(thePt, theRadius)
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
Stroke.GetRectangleIntersections
Microsoft.Ink.Ink.HitTest
Microsoft.Ink.Stroke.NearestPoint