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 portions of a IInkStrokeDispobject or IInkStrokescollection belonging to an IInkDispobject that are outside a rectangle.

Syntax

HRESULT Clip (
  [in] IInkRectangle* 
rectangle
);

Parameters

rectangle

[in] Specifies the rectangle outside of which the stroke or strokes are clipped. The rectangle is specified in ink space coordinates.

Return Value

S_OK

Success.

E_POINTER

A parameter contained an invalid pointer.

REGDB_CLASSNOTREG

The IInkDispink 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

For an IInkDispobject, all strokes intersected by the rectangle are split at the intersection points. All portions of strokes outside the rectangle are removed from the IInkDispobject. The method may add new points to a stroke at the point where the stroke intersects the rectangle. After you call the Clipmethod on an IInkDispobject, the IDs of the strokes in the IInkDispobject'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 a 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.

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

IInkStrokes