Freigeben über


Strokes Class

Strokes Class

Contains the collection of Stroke objects.

Definition

Visual Basic .NET Public Class Strokes
Inherits Object
Implements ICollection, IDisposable, IEnumerable
C# public class Strokes : Object,
ICollection, IDisposable, IEnumerable
Managed C++ public __gc class Strokes : public Object,
ICollection, IDisposable, IEnumerable

Members Table

The following table lists the members exposed by the object.

Events

Event Description
StrokesAdded Occurs when one or more strokes are added to the Strokes collection.
StrokesRemoved Occurs when one or more strokes are deleted from the Strokes collection.

Methods

Method Description
Add Adds a Stroke object to the Strokes collection.
Clear Clears all the Stroke objects from the Strokes collection.
Clip Removes the portions of every Stroke object in the Strokes collection that are outside a given rectangle.
Contains Indicates whether the Strokes collection contains a specific Stroke object.
CopyTo Copies all of the elements of the current Strokes collection to the specified one-dimensional array, starting at the specified destination array index.
Dispose Releases resources used by the Strokes collection.
Equals Leave Site Determines whether two Object Leave Site instances are equal. Inherited from Object Leave Site.
Finalize Frees the resources of the current Strokes object before it is reclaimed by the garbage collector.
GetBoundingBox Returns the bounding Rectangle Leave Site that contains the Strokes collection.
GetEnumerator Returns an object that implements the System.Collections.IEnumerator Leave Site interface and that can iterate through the Stroke objects within the Strokes collection.
GetHashCode Leave Site Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. Inherited from Object Leave Site.
GetType Leave Site Gets the Type Leave Site of the current instance. Inherited from Object Leave Site.
IEnumerable.GetEnumerator
IndexOf Returns the index of a specific Stroke object within a Strokes collection.
MemberwiseClone Leave Site Creates a shallow copy of the current Object Leave Site. Inherited from Object Leave Site.
ModifyDrawingAttributes Sets the DrawingAttributes property of all of the Stroke objects in Strokes collection.
Move Applies a translation to the ink of the Strokes collection.
static (Shared in Visual Basic .NET)ReferenceEquals Leave Site Determines whether the specified Object Leave Site instances are the same instance. Inherited from Object Leave Site.
Remove Removes one or more Stroke objects from the Strokes collection.
RemoveAt Removes the Stroke object at the specified index of the Strokes collection.
RemoveRecognitionResult Removes the RecognitionResult object that is associated with the Strokes collection.
Rotate Rotates the Strokes collection around a center point.
Scale Scales the Strokes collection in the X and Y dimensions.
ScaleToRectangle Scales the Strokes collection to fit in the specified Rectangle Leave Site structure.
Shear Shears the Strokes collection by the specified horizontal and vertical factors.
ToString Deprecated. Returns a string that represents the top RecognitionResult object for the current Strokes collection.
Transform Applies a linear transformation to a Strokes collection.

Properties

Property Description
Count Gets the number of Stroke objects contained in the Strokes collection.
Ink Gets the Ink object that contains the Strokes collection.
IsFixedSize Gets a value indicating whether the Strokes collection has a fixed size.
IsReadOnly Gets a value indicating whether the Strokes collection is read-only.
IsSynchronized Gets a value that indicates whether or not access to the Strokes collection is synchronized (thread safe).
Item Gets the Stroke object at the specified index within the Strokes collection.
RecognitionResult Gets the RecognitionResult object of the Strokes collection.
SyncRoot Returns an object that can be used to synchronize access to the Strokes collection.

Inheritance Hierarchy

Object Leave Site

Strokes

Remarks

A Strokes collection is a subset of strokes in an Ink object. Examples of Strokes collections are:

  • All the strokes that are drawn by the same cursor.
  • The strokes in the Ink object that correspond to a word.
  • All the strokes that intersect a known region.

Strokes collections are references to ink data and are not the actual data itself.

Caution: To avoid a memory leak you must explicitly call the Dispose method on any Strokes collection to which an event handler has been attached before the collection goes out of scope.

After the Strokes collection is created, it can be used to specify various operations on that subset of strokes, such as drawing, measuring, deleting, or extracting the set to a new Ink object.

Class Information

Namespace Microsoft.Ink
Assembly Microsoft.Ink (microsoft.ink.dll)
Strong Name Microsoft.Ink, Version=1.7.4009.0, Culture=neutral, PublicKeyToken=a2870d9cc4d021c8

See Also