Indicates if the given x and y coordinates are contained by the element.
[Visual Basic 6.0] Function HitTest(
ByVal x As Double, _
ByVal y As Double, _
ByVal Tolerance As Double _
) As Boolean
[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 );
[Java] public Boolean hitTest ( double x, double y, double Tolerance ) throws IOException, AutomationException
[C++]
HRESULT HitTest(
double x,
double y,
double Tolerance,
VARIANT_BOOL* hit
);
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
hit [out, retval]
hit is a parameter of type VARIANT_BOOL
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.