Share via


Stroke.GetFlattenedBezierPoints Method (Int32)

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

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

Syntax

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

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

Parameters

  • fittingError
    Type: System.Int32

    The maximum distance (accuracy), in HIMETRIC units, between the Bezier control points and the points of the Stroke object. This is also known as the curve fitting error level.

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

Set the fittingError parameter to a value between 0 and 500 HIMETRIC units, if possible. If the value is greater than 500, a stroke may appear distorted or coarse when drawn. Strokes appear smoothest when the fitting error level is set to 0, but the drawing performance is slowest at this level.

Examples

In this example, the flattened bezier points (with a fittingError of 500 HIMETRIC units) 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(500)
    Dim newStroke As Stroke = S.Ink.CreateStroke(bPts)
    newStroke.Move(200, 200)
Next
foreach (Stroke S in mInkOverlay.Selection)
{
    Point[] bPts = S.GetFlattenedBezierPoints(500);
    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