Stroke.HitTest - метод
Обновлен: Ноябрь 2007
Returns a value that indicates whether a Stroke object is either completely inside or intersected by a given circle.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink (в Microsoft.Ink.dll)
Синтаксис
'Декларация
Public Function HitTest ( _
pt As Point, _
radius As Single _
) As Boolean
'Применение
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
Параметры
- pt
Тип: System.Drawing.Point
The center of the hit test circle, in ink space coordinates.
- radius
Тип: System.Single
The radius of the hit test circle.
Возвращаемое значение
Тип: System.Boolean
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. |
Примеры
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)
Платформы
Windows Vista
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0
См. также
Ссылки
Microsoft.Ink - пространство имен