IInkDisp::HitTestCircle method (msinkaut.h)
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
[in] X
The x-position of the center of the hit test circle in ink space units.
[in] Y
The y-position of the center of the hit test circle in ink space units.
[in] radius
The radius of the circle to use in the hit test, in ink space units.
[out, retval] 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 |
---|---|
|
Success. |
|
A parameter contained an invalid pointer. |
|
An exception occurred inside the method. |
|
Invalid display handle. |
|
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
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