IInkStrokeDisp::Split method (msinkaut.h)

Splits the stroke at the specified location on the stroke.

Syntax

HRESULT Split(
  [in]          float          SplitAt,
  [out, retval] IInkStrokeDisp **NewStroke
);

Parameters

[in] SplitAt

The floating point index value that represents where to split the stroke.

Note  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.
 

[out, retval] NewStroke

When this method returns, contains a pointer to the new IInkStrokeDisp object that is created from the split operation.

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_OUTOFMEMORY
Cannot allocate Stroke handler helper object.
E_INVALIDARG
The parameter is invalid.
E_UNEXPECTED
Unexpected parameter or property type.
E_INK_EXCEPTION
An exception occurred inside the method.

Remarks

This method inserts the new stroke immediately after the original stroke in the stroke set and renumbers the remaining stroke indices.

When an IInkStrokeDisp is split, the beginning portion of the stroke remains the ID of the original IInkStrokeDisp. The end portion of the IInkStrokeDisp becomes a new IInkStrokeDisp with an ID that is one greater than the highest IInkStrokeDisp ID. If the original IInkStrokeDisp was in an InkStrokes collection (other than the Ink.Strokes), only the beginning portion remains in that collection.

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

IInkStrokeDisp Interface