Share via


Ink.ExtractStrokes Method (Rectangle)

Extracts the all the Stroke objects that are within the bounds of a specified rectangle, from the Ink object, and returns a new Ink object containing the extracted Strokes collection.

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

Syntax

'Declaration
Public Function ExtractStrokes ( _
    extractionRectangle As Rectangle _
) As Ink
'Usage
Dim instance As Ink
Dim extractionRectangle As Rectangle
Dim returnValue As Ink

returnValue = instance.ExtractStrokes(extractionRectangle)
public Ink ExtractStrokes (
    Rectangle extractionRectangle
)
public:
Ink^ ExtractStrokes (
    Rectangle extractionRectangle
)
public Ink ExtractStrokes (
    Rectangle extractionRectangle
)
public function ExtractStrokes (
    extractionRectangle : Rectangle
) : Ink
Not applicable.

Parameters

  • extractionRectangle
    The Rectangle that delimits the ink to extract from the 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 ExtractFlags.

Example

This C# example creates a new Ink object, theNewInk. The new Ink object contains a copy of the Strokes collection in the Ink object of an InkCollector object, theInkCollector, which is bounded by the Rectangle, rectSelection. The Strokes collection is removed from the area bounded by rectSelection in the original Ink object.

Ink theNewInk = theInkCollector.Ink.ExtractStrokes(rectSelection);

This Microsoft Visual Basic.NET example creates a new Ink object, theNewInk. The new Ink object contains a copy of the Strokes collection in the Ink object of an InkCollector object, theInkCollector, which is bounded by the Rectangle, rectSelection. The Strokes collection is removed from the area bounded by rectSelection in the original Ink object.

Dim theNewInk As Ink = theInkCollector.Ink.ExtractStrokes(rectSelection)

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