Share via


IInkStrokeDisp::FindIntersections

4/8/2010

Returns the points where this IInkStrokeDisp stroke object intersects other IInkStrokeDisp objects within a known IInkStrokes collection.

Syntax

HRESULT FindIntersections (
  [in] IInkStrokes* strokes,
  [out, retval] VARIANT *Intersections
);

Parameters

  • strokes
    [in] Specifies the known collection of strokes that are used to calculate the points where this stroke intersects strokes in the collection. If NULL, use all strokes in the IInkDisp object.

    Note

    The known collection of strokes must come from the same IInkDisp object as the stroke being tested for intersection. If it is not from the same IInkDisp object, E_INK_MISMATCHED_INK_OBJECT is returned (see "HRESULT value" below). The FindIntersections method is the only Windows Mobile Ink API that requires that the known collection of strokes come from the same IInkDisp object.

  • Intersections
    [out, retval] Returns an array of floating point index values that indicate the locations where this stroke intersects strokes within a known collection of strokes.

    A floating point index is a float value that represents a location somewhere between two points in the stroke. As examples, if 0.0 is the first point in the stroke and 1.0 is the second point in the stroke, 0.5 is halfway between the first and second points. Similarly, a floating point index value of 37.25 represents a location that is 25 percent along the line between points 37 and 38 of the stroke.

    For more information about the VARIANT structure, see Using the Automation Library with Windows Mobile Ink.

Return Value

  • S_OK
    Success.
  • E_POINTER
    A parameter contained an invalid pointer.
  • E_OUTOFMEMORY
    Cannot allocate an IInkStrokeDisp handle helper object.
  • E_INK_EXCEPTION
    An exception occurred inside the method.
  • E_UNEXPECTED
    Unexpected parameter or property type.
  • E_INK_INCOMPATIBLE_OBJECT
    The IInkStrokes* parameter does not point to a compatible IInkDisp object.
  • E_INK_MISMATCHED_INK_OBJECT
    The IInkDisp object of the IInkStrokes collection and this IInkStrokeDisp object don't match.

Remarks

This method can determine only the points of intersection.

Requirements

Header msinkaut.h
Windows Embedded CE Windows CE 5.0 and later
Windows Mobile Windows Mobile 6 Classic and later, Windows Mobile 6 Professional and later

See Also

Concepts

Windows Mobile Ink Reference