IInkDisp::HitTestCircle method (msinkaut.h)

Retrieves the InkStrokes collection that are either completely inside or intersected by a known circle.

Syntax

HRESULT HitTestCircle(
  long        X,
  long        Y,
  float       radius,
  IInkStrokes **Strokes
);

Parameters

X

The x-position of the center of the hit test circle in ink space units.

Y

The y-position of the center of the hit test circle in ink space units.

radius

The radius of the circle to use in the hit test, in ink space units.

Strokes

When this method returns, contains the collection of strokes that are either completely inside or intersected by the specified circle.

Return value

This method can return one of these values.

Return code Description
S_OK
Success.
E_POINTER
A parameter contained an invalid pointer.
E_INK_EXCEPTION
An exception occurred inside the method.
E_INVALIDARG
Invalid display handle.
E_UNEXPECTED
Unexpected parameter or property type.

Remarks

If a stroke intersects the circle, the complete stroke is returned.

The method computes the intersection, considering the full set of drawing attributes that apply to the stroke, including the full pen width, Bezier smoothing (if present), and shape of the pen tip.

After a rotation or shear transform has been performed on a stroke or a collection of strokes, the transformed x- and y- coordinates are no longer concentric with the original coordinates. Because of this, the radius argument should not be calculated from the x- or y- coordinates.

To determine which points of a known stroke intersect the test area, call the HitTest method of the IInkStrokeDisp object.

The application must always pass in a destination pointer for the resulting collection of strokes. If there are no intersections, the collection has a count of zero.

Requirements

   
Minimum supported client Windows XP Tablet PC Edition [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header msinkaut.h
Library InkObj.dll

See also

HitTest(Point[], Single) Method

HitTest(Rectangle, Single) Method

IInkDisp

InkDisp Class

InkStrokes Collection