IInkDisp::HitTestWithRectangle method (msinkaut.h)

Retrieves the strokes that are contained within a specified rectangle.

Syntax

HRESULT HitTestWithRectangle(
  IInkRectangle *SelectionRectangle,
  float         IntersectPercent,
  IInkStrokes   **Strokes
);

Parameters

SelectionRectangle

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

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.

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

   
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