IInkStrokeDisp::GetFlattenedBezierPoints method (msinkaut.h)

Retrieves the bounding box in ink space coordinates for either all of the strokes in an InkDisp object, an individual stroke, or a InkStrokes collection.

Syntax

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

Parameters

[in, optional] FittingError

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.

[out, retval] FlattenedBezierPoints

When this method returns, contains 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, and so on, of the Bezier points.

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

Return value

This method can return one of these values.

Return code 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 the fittingError parameter 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.

Requirements

Requirement Value
Minimum supported client Windows XP Tablet PC Edition [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header msinkaut.h
Library InkObj.dll

See also

IInkStrokeDisp Interface

IInkStrokeDisp::BezierPoints Property