IInkDisp::HitTestWithRectangle method (msinkaut.h)

Retrieves the strokes that are contained within a specified rectangle.

Syntax

HRESULT HitTestWithRectangle(
  [in]          IInkRectangle *SelectionRectangle,
  [in]          float         IntersectPercent,
  [out, retval] IInkStrokes   **Strokes
);

Parameters

[in] SelectionRectangle

The selection rectangle, of type InkRectangle, in ink space coordinates.

[in] IntersectPercent

The float or single percentage value that determines which strokes are included in the collection. Strokes that intersect the rectangle are included in the collection if the percentage of points in those strokes contained within the rectangle is greater than or equal to the IntersectPercent percentage.

[out, retval] Strokes

When this method returns, contains a pointer to the collection of strokes that makes up the ink.

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.

Remarks

To determine which points of a known stroke intersect the test area, call the GetRectangleIntersections method of the IInkStrokeDisp object, which retrieves the points where a stroke intersects a known rectangle.

Requirements

Requirement Value
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(Point[], Single) Method

IInkDisp

InkDisp Class

InkStrokes Collection