This document is archived and information here might be outdated. Recommended version. |
Indicates if the given x and y coordinates are contained by the element.
[Visual Basic .NET]
Public Function HitTest ( _
ByVal x As Double, _
ByVal y As Double, _
ByVal Tolerance As Double _
) As Boolean
[C#]
public bool HitTest (
double x,
double y,
double Tolerance
);
[C++]
HRESULT HitTest(
double x,
double y,
double Tolerance
);
[C++] Parameters x [in]
x is a parameter of type double y [in]
y is a parameter of type double Tolerance [in]
Tolerance is a parameter of type double
HitTest returns a boolean value indicating whether or not the current element is intersected by the specified coordinate pair and tolerance distance. For instance, if we have a line element selected, the HitTest is determining whether that line element is within the specified tolerance from the given X and Y. A value of TRUE is returned if the element is within the tolerance, while FALSE is returned if it is not.
The X,Y, and tolerance values should be specified in map units.