共用方式為


Ink.CreateStroke Method

Ink.CreateStroke Method

Creates a Stroke object from an array of Point Leave Site input values.

Definition

Visual Basic .NET Public Function CreateStroke( _
ByVal points() As Point _
) As Stroke
C# public Stroke CreateStroke(
Point[] points
);
Managed C++ public: Stroke* CreateStroke(
Point *points __gc[]
);

Parameters

points System.Drawing.Point[]. The array of points that make up the Stroke object.

Return Value

Microsoft.Ink.Stroke. The newly created Stroke object.

Exceptions

ObjectDisposedException Leave Site: The Ink object is disposed.

Remarks

The minimum and maximum values of any point in the points array are the System.Int32.MinValue Leave Site and System.Int32.MaxValue Leave Site fields, respectively. However, these points define an ink space rectangle whose maximum width or height cannot exceed System.Int32.MaxValue Leave Site. Because of this, the difference between the minimum and maximum x-coordinates or the minimum and maximum y-coordinates cannot exceed System.Int32.MaxValue Leave Site.

Examples

[C#]

This C# example creates a Stroke object in an Ink object, theInk, from an array of Point Leave Site objects, theStrokePoints.

Stroke theStroke = theInk.CreateStroke(theStrokePoints);

[Visual Basic .NET]

This Microsoft® Visual Basic® .NET example creates a Stroke object in an Ink object, theInk, from an array of Point Leave Site objects, theStrokePoints.

Dim theStroke As Stroke = theInk.CreateStroke(theStrokePoints)

See Also