HitTest property

HitTest property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

See also         Example         Applies to

Determines if a given x,y position hits outside, inside, or on the boundary of a shape.

Version added

4.5

Syntax

        
          intRet = object.HitTest(x, y, tolerance)
      

intRet

Integer. Any combination of the values of the constants prefixed by visHit. See Remarks.

object

Required. An expression that returns a Shape object.

x

Required Double. The x-coordinate to be tested for a hit.

y

Required Double. The y-coordinate to be tested for a hit.

tolerance

Required Double. How close x,y must be to a shape for a hit to occur.

Remarks

The HitTest property considers only visible geometry, and ignores hidden geometry.

Use internal drawing units (inches in the drawing) for the x, y, and tolerance values. These values should also be in, and with respect to, the coordinate space of the page, master, or group shape that contains the shape being hit tested.

The following are possible values of intRet, and are declared by the Visio type library in VisHitTestResults.

Constant

Value

visHitOutside

0

visHitOnBoundary

1

visHitInside

2