Share via


Stroke.GetFlattenedBezierPoints Method

Returns the array of points that are used to approximate the Bezier representation of a Stroke object with a fitting error of 0.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
Public Function GetFlattenedBezierPoints As Point()
'Usage
Dim instance As Stroke 
Dim returnValue As Point()

returnValue = instance.GetFlattenedBezierPoints()
public Point[] GetFlattenedBezierPoints()
public:
array<Point>^ GetFlattenedBezierPoints()
public function GetFlattenedBezierPoints() : Point[]

Return Value

Type: array<System.Drawing.Point[]
Returns a Point array that indicates the points that were used to draw the Bezier curve representation of the Stroke object.

Remarks

The fitting error is set to 0. Strokes appear smoothest when using this default overload, but the drawing performance is slowest. To set the fitting error manually, use the GetFlattenedBezierPoints(Int32) overload of this method.

Examples

In this example, the flattened bezier points of each selected Stroke object of an InkOverlay are used to create a new Stroke object. The new Stroke object is then moved by 200 HIMETRIC units in both the X and Y direction.

For Each S As Stroke In mInkOverlay.Selection
    Dim bPts() As Point = S.GetFlattenedBezierPoints()
    Dim newStroke As Stroke = S.Ink.CreateStroke(bPts)
    newStroke.Move(200, 200)
Next
foreach (Stroke S in mInkOverlay.Selection)
{
    Point[] bPts = S.GetFlattenedBezierPoints();
    Stroke newStroke = S.Ink.CreateStroke(bPts);
    newStroke.Move(200, 200);
}

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

See Also

Reference

Stroke Class

Stroke Members

GetFlattenedBezierPoints Overload

Microsoft.Ink Namespace

Stroke.BezierPoints