Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/8/2010

Removes the portions of an IInkStrokeDispobject 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 IInkStrokeDispobject is intersected by the rectangle, the IInkStrokeDispis split at the intersection points. All portions of the stroke outside the rectangle are removed from the IInkStrokeDispobject. 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 Clipmethod updates the parent IInkDispobject. Whenever ink is removed from an IInkDispobject, any IInkStrokeDispobjects or IInkStrokescollections defined for that IInkDispobject 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