Partager via


Ink Class

Ink Class

Represents the collected strokes of ink within an ink space.

Definition

Visual Basic .NET Public Class Ink
Inherits Object
Implements ICloneable, IDisposable
C# public class Ink : Object,
ICloneable, IDisposable
Managed C++ public __gc class Ink : public Object,
ICloneable, IDisposable

Members Table

The following table lists the members exposed by the object.

Events

Event Description
InkAdded Occurs when a stroke is added to the Ink object.
InkDeleted Occurs when a stroke is deleted from the Ink object.

Fields

Field Description
static (Shared in Visual Basic .NET)InkSerializedFormat Returns a string that contains the name of the format for ink serialized format (ISF) for querying the Clipboard.

Methods

Method Description
AddStrokesAtRectangle Specifies the known Strokes collection to insert into this Ink object at a specified rectangle.
CanPaste Returns a value that indicates whether data (either on the Clipboard Leave Site, or as an IDataObject Leave Site) can be converted to an Ink object.
Clip Removes the portions of a Stroke object or Strokes collection that are outside a given rectangle.
ClipboardCopy Copies an Ink object or Strokes collection to the Clipboard Leave Site.
ClipboardPaste Pastes an IDataObject Leave Site, either specified or from the Clipboard Leave Site, to this Ink object.
Clone Creates a copy of this Ink object.
CreateStroke Creates a Stroke object from points or packet data.
CreateStrokes Creates a Strokes collection for this Ink object.
DeleteStroke Deletes a Stroke object from the Ink object.
DeleteStrokes Deletes a Strokes collection from the Ink object.
Dispose Releases resources used by the Ink object.
Equals Leave Site Determines whether two Object Leave Site instances are equal. Inherited from Object Leave Site.
ExtractStrokes Extracts Stroke objects from the Ink object and returns a new Ink object containing the extracted Stroke objects.
Finalize Frees the resources of the current Ink object before it is reclaimed by the garbage collector.
GetBoundingBox Returns the bounding Rectangle Leave Site that contains all of the Stroke objects in the Ink object.
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.
HitTest Returns the Strokes collection contained within the specified area.
ICloneable.Clone
Ink Initializes a new instance of the Ink class.
Load Populates a new Ink object with known binary data.
MemberwiseClone Leave Site Creates a shallow copy of the current Object Leave Site. Inherited from Object Leave Site.
NearestPoint Returns the Stroke object within the Ink object that is nearest to a known Point Leave Site.
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.
Save Converts the Ink object to a specified format and returns the binary data in a Byte Leave Site array.
ToString Leave Site Returns a String Leave Site that represents the current Object Leave Site. Inherited from Object Leave Site.

Properties

Property Description
CustomStrokes Gets the CustomStrokes collection to be persisted with the ink.
Dirty Gets or sets the value that indicates whether an Ink object has been modified since the last time the ink was saved.
ExtendedProperties Gets the collection of application-defined data.
Strokes Gets a copy of the Strokes collection contained in the Ink object.

Inheritance Hierarchy

Object Leave Site

Ink

Remarks

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

An Ink object is a container of stroke (point) data. The stroke data, or the points collected by the pen, are put into an Ink object. The Strokes property contains the data for all strokes within the Ink object.

The InkCollector object, InkOverlay object, InkPicture control, and InkEdit control collect points from the input device and put them into an Ink object. These objects essentially act as the source that distributes ink into one or many different Ink objects, which act as containers that hold the distributed ink.

The ink space is a virtual coordinate space to which the coordinates of the tablet context are mapped. This space is fixed to a HIMETRIC coordinate system. In ink space coordinates, a move from 0 to 1 equals 1 HIMETRIC unit. This mapping makes it easy to relate multiple Ink objects.

The Renderer object manages the mappings between ink and the display window.

Class Information

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