다음을 통해 공유


GetFlattenedBezierPoints Method

GetFlattenedBezierPoints Method

Returns the array of actual points that are used to approximate the Bezier representation of a IInkStrokeDisp object.

Declaration

[C++]

HRESULT GetFlattenedBezierPoints (
    [in, optional, defaultvalue(0)] long fittingError,
    [out, retval] VARIANT *FlattenedBezierPoints
);

[Microsoft® Visual Basic® 6.0]

Public Function GetFlattenedBezierPoints( _
  [fittingError As Long] _
) As Variant

Parameters

fittingError

[in, optional] The maximum distance (accuracy), using ink space units, between the Bezier control points and the points of the stroke. This is also known as the curve fitting error level. The default value is 0.

FlattenedBezierPoints

[out, retval] Returns a point array that indicates the points that were used to draw the Bezier curve representation of the IInkStrokeDisp object. The Variant result contains an array in the form x1, y1, x2, y2, etc. of the Bezier points.

For more information about the VARIANT structure, see Using the Automation Library.

Return Value

HRESULT value Description
S_OK Success.
TPC_E_INVALID_STROKE The stroke is invalid.
E_POINTER A parameter contained an invalid pointer.
E_FAIL An unspecified error occurred.
E_OUTOFMEMORY Cannot allocate Stroke handler helper object.
E_INVALIDARG The fitting error was out of range.
E_INK_EXCEPTION An exception occurred inside the method.
E_UNEXPECTED Unexpected parameter or property type.

Remarks

You should ideally set fittingError between 0 and 500. 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.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example gets the flattened Bezier points of IInkStrokeDisp, theStroke. The Variant result contains an array in the form x1, y1, x2, y2, etc. of the Bezier points.

Dim ptStrokePoints As Variant
Set ptStrokePoints = theStroke.GetFlattenedBezierPoints

Applies To