IInkDisp::Clip method (msinkaut.h)
Removes portions of an IInkStrokeDisp object or InkStrokes collection that are outside a rectangle.
Syntax
HRESULT Clip(
[in] IInkRectangle *Rectangle
);
Parameters
[in] Rectangle
Specifies the rectangle outside of which the stroke or strokes are clipped. The rectangle is specified in ink space coordinates.
Return value
This method can return one of these values.
Return code | Description |
---|---|
|
Success. |
|
A parameter contained an invalid pointer. |
|
The InkDisp object is not registered. |
|
Invalid clip rectangle. |
|
An exception occurred inside the method. |
|
An unspecified error occurred. |
Remarks
For an InkDisp object, all strokes intersected by the rectangle are split at the intersection points. All portions of strokes outside the rectangle are removed from the InkDisp object. The method may add new points to a stroke at the point where the stroke intersects the rectangle. After you call the Clip method on an InkDisp object, the IDs of the strokes in the InkDisp object's strokes collection are guaranteed to be unique, but not guaranteed to preserve other information.
This method does not take the pen width into account when clipping. It clips only the actual ink or stroke data.
For an IInkStrokeDisp object or InkStrokes collection, the Clip method updates the parent InkDisp object. Whenever ink is removed from an InkDisp object, any IInkStrokeDisp objects or InkStrokes collections defined for that InkDisp object may be invalidated.
For more information on ink data, see Ink Data.
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 |