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 function ExtractStrokes(
extractionRectangle : Rectangle
) : Ink
Parameters
extractionRectangle
Type: System.Drawing.RectangleThe Rectangle that delimits the ink to extract from the 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 ExtractFlags.
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 Stroke objects that fall within the specified Rectangle are removed from the original Ink object associated with the InkOverlay object.
Dim R As Rectangle = New Rectangle(0, 0, 2000, 2000)
Dim newInk As Ink = mInkOverlay.Ink.ExtractStrokes(R)
Rectangle R = new Rectangle(0, 0, 2000, 2000);
Ink newInk = mInkOverlay.Ink.ExtractStrokes(R);
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