IInkDisp::ExtractWithRectangle method (msinkaut.h)
Cuts or copies strokes from an existing InkDisp object and pastes them into a new InkDisp object, by using the known rectangle to determine which strokes to extract.
Syntax
HRESULT ExtractWithRectangle(
[in] IInkRectangle *Rectangle,
[in, optional] InkExtractFlags extractFlags,
[out, retval] IInkDisp **ExtractedInk
);
Parameters
[in] Rectangle
Specifies the InkRectangle object which delimits the ink to extract from the InkDisp object.
[in, optional] extractFlags
Optional. Specifies the InkExtractFlags enumeration type, which determines whether the ink should be cut or copied from the existing InkDisp object. The default value is IEF_DEFAULT, which cuts the strokes from the existing InkDisp object.
[out, retval] ExtractedInk
When this method returns, contains a pointer to an InkDisp object that contains the extracted collection of strokes.
Return value
This method can return one of these values.
Return code | Description |
---|---|
|
Success. |
|
A parameter contained an invalid pointer. |
|
An exception occurred inside the method. |
|
Not all strokes were extracted. |
|
Cannot allocate memory to complete the operation. |
|
Invalid extraction flags. |
|
The Ink object was not registered. |
Remarks
The new InkDisp object retains the drawing attributes, properties, and coordinates of the original InkDisp object.
This method is useful for creating a new InkDisp object without the deleted or cut strokes from the original object.
To extract strokes from a known collection of strokes, call the ExtractStrokes Method.
Only the portion of a stroke that is within the rectangle is added to the new InkDisp object.
When the extractFlags parameter is RemoveFromOriginal or Default, any strokes that cross the rectangle are split and the portion within the rectangle removed from the existing InkDisp object.
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 |