Share via


Ink.ExtractStrokes Method (Strokes, ExtractFlags)

Extracts the specified Stroke objects from the Ink object by using either cut or copy, as specified, and returns a new Ink object containing the extracted Stroke objects.

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)

Syntax

'Declaration
Public Function ExtractStrokes ( _
    strokes As Strokes, _
    extractionFlags As ExtractFlags _
) As Ink
'Usage
Dim instance As Ink
Dim strokes As Strokes
Dim extractionFlags As ExtractFlags
Dim returnValue As Ink

returnValue = instance.ExtractStrokes(strokes, extractionFlags)
public Ink ExtractStrokes (
    Strokes strokes,
    ExtractFlags extractionFlags
)
public:
Ink^ ExtractStrokes (
    Strokes^ strokes, 
    ExtractFlags extractionFlags
)
public Ink ExtractStrokes (
    Strokes strokes, 
    ExtractFlags extractionFlags
)
public function ExtractStrokes (
    strokes : Strokes, 
    extractionFlags : ExtractFlags
) : Ink
Not applicable.

Parameters

  • strokes
    The Strokes collection to extract.
  • extractionFlags
    One of the ExtractFlags values that specifies whether the ink is cut or copied into the new Ink object.

Return Value

Returns an Ink object that contains the extracted Strokes collection.

Remarks

The new Ink object retains the drawing attributes, properties, and coordinates of the original Ink object.

The default behavior for this method is to remove the Strokes collection from the original Ink object. To preserve the Strokes collection in the original Ink object and make a copy of the Ink, call either the ExtractStrokes or ExtractStrokes overload of this method with the extractionFlags parameter set to the CopyFromOriginal value from the ExtractFlags enumeration.

Example

This C# example creates a new Ink object, theNewInk. The new Ink object contains a previously determined set of strokes, theStrokes, which are copied from the Ink object in an InkCollector, theInkCollector. The Strokes collection remains in the original Ink object, because the extractionFlags parameter is set to the CopyFromOriginal value from the ExtractFlags enumeration.

Ink theNewInk = theInkCollector.Ink.ExtractStrokes(theDeletedStrokes,
    ExtractFlags.CopyFromOriginal);

This Microsoft Visual Basic.NET example creates a new Ink object, theNewInk. The new Ink object contains a previously determined set of strokes, theStrokes, which are copied from the Ink object in an InkCollector, theInkCollector. The Strokes collection remains in the original Ink object, because the extractionFlags parameter is set to the CopyFromOriginal value from the ExtractFlags enumeration..

Dim theNewInk As Ink = _
    theInkCollector.Ink.ExtractStrokes(theDeletedStrokes, _
    ExtractFlags.CopyFromOriginal)

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

Ink Class
Ink Members
Microsoft.Ink Namespace
Strokes
ExtractFlags