Share via


IInkStrokes::Clip

4/8/2010

Removes portions of any IInkStrokeDisp objects in the IInkStrokes collection that are outside a rectangle.

Syntax

HRESULT Clip (
  [in] IInkRectangle *rectangle
);

Parameters

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

Return Value

HRESULT value Description

S_OK

Success.

E_POINTER

A parameter contained an invalid pointer.

REGDB_CLASSNOTREG

The IInkDisp object is not registered.

E_INVALIDARG

Invalid clip rectangle.

E_INK_EXCEPTION

An exception occurred inside the method.

E_FAIL

An unspecified error occurred.

Remarks

Wherever the IInkStrokeDisp objects in an IInkStrokes collection are intersected by the rectangle, the strokes are split at the intersection points. All portions of the strokes outside the rectangle are removed from the IInkStrokeDisp objects. The method may add new points to the strokes at the point where the strokes intersects the rectangle.

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 IInkStrokes collection, 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