Ink.ExtractStrokes Method (Rectangle, ExtractFlags)
Extracts the all the Stroke objects within the bounds of a specified rectangle from the Ink object by using either cut or copy, as specified, 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, _
extractionFlags As ExtractFlags _
) As Ink
'Usage
Dim instance As Ink
Dim extractionRectangle As Rectangle
Dim extractionFlags As ExtractFlags
Dim returnValue As Ink
returnValue = instance.ExtractStrokes(extractionRectangle, _
extractionFlags)
public Ink ExtractStrokes(
Rectangle extractionRectangle,
ExtractFlags extractionFlags
)
public:
Ink^ ExtractStrokes(
Rectangle extractionRectangle,
ExtractFlags extractionFlags
)
public function ExtractStrokes(
extractionRectangle : Rectangle,
extractionFlags : ExtractFlags
) : Ink
Parameters
extractionRectangle
Type: System.Drawing.RectangleThe Rectangle that delimits the ink to extract from the Ink object.
extractionFlags
Type: Microsoft.Ink.ExtractFlagsOne of the ExtractFlags values that specifies whether the ink is cut or copied into the new Ink object.
Return Value
Type: Microsoft.Ink.Ink
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.
Examples
In this example, a new Ink object is created that contains Stroke objects as bounded by the specified Rectangle (2000 x 2000 HIMETRIC units). The Strokes collection is preserved in the original Ink object, because the extractionFlags parameter is set to the CopyFromOriginal value from the ExtractFlags enumeration.
Dim R As Rectangle = New Rectangle(0, 0, 2000, 2000)
Dim newInk As Ink = mInkOverlay.Ink.ExtractStrokes(R, ExtractFlags.CopyFromOriginal)
Rectangle R = new Rectangle(0, 0, 2000, 2000);
Ink newInk = mInkOverlay.Ink.ExtractStrokes(R, ExtractFlags.CopyFromOriginal);
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0