InkDisp.HitTestCircle method

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

Syntax


HRESULT HitTestCircle(
  [in]          long        X,
  [in]          long        Y,
  [in]          float       radius,
  [out, retval] IInkStrokes **Strokes
);

Parameters

X [in]

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

Y [in]

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

radius [in]

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

Strokes [out, retval]

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 codeDescription
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

Header

Msinkaut.h (also requires Msinkaut_i.c)

Library

InkObj.dll

See also

InkDisp Class
HitTest(Point[], Single) Method
HitTest(Rectangle, Single) Method
InkStrokes Collection

 

 

Show: