Share via


IInkStrokeDisp::Clip

4/8/2010

Removes the portions of an IInkStrokeDisp object that are outside a rectangle.

Syntax

HRESULT Clip (
  [in] IInkRectangle* rectangle
);

Parameters

  • rectangle
    [in] Specifies the rectangle outside of which the stroke is clipped. The rectangle is specified in ink space coordinates (the origin is at the upper left corner of the ink collection area).

Return Value

  • S_OK
    Success.
  • E_POINTER
    A parameter contained an invalid pointer.
  • REGDB_CLASSNOTREG
    The Ink object is not registered.
  • E_FAIL
    An unspecified error occurred.
  • E_INVALIDARG
    Invalid clip rectangle.
  • E_INK_EXCEPTION
    An exception occurred inside the method.

Remarks

Wherever the IInkStrokeDisp object is intersected by the rectangle, the IInkStrokeDisp is split at the intersection points. All portions of the stroke outside the rectangle are removed from the IInkStrokeDisp object. The method may add new points to the stroke at the point where the stroke intersects the rectangle.

This method does not take the pen width into account when clipping. It clips only the actual ink or stroke data.

The Clip method updates the parent IInkDisp object. Whenever ink is removed from an IInkDisp object, any IInkStrokeDisp objects or IInkStrokes collections defined for that IInkDisp object may be invalidated.

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