IUIAnimationPrimitiveInterpolation::AddCubic method (uianimation.h)

Adds a cubic polynomial segment that describes the shape of a transition curve to the animation function.

Syntax

HRESULT AddCubic(
  [in] UINT                 dimension,
  [in] UI_ANIMATION_SECONDS beginOffset,
  [in] FLOAT                constantCoefficient,
  [in] FLOAT                linearCoefficient,
  [in] FLOAT                quadraticCoefficient,
  [in] FLOAT                cubicCoefficient
);

Parameters

[in] dimension

The dimension in which to apply the new segment.

[in] beginOffset

The begin offset for the segment, where 0 corresponds to the start of the transition.

[in] constantCoefficient

The cubic polynomial constant coefficient.

[in] linearCoefficient

The cubic polynomial linear coefficient.

[in] quadraticCoefficient

The cubic polynomial quadratic coefficient.

[in] cubicCoefficient

The cubic polynomial cubic coefficient.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. See Windows Animation Error Codes for a list of error codes.

Remarks

This method will fail with an error code of UI_E_INVALID_PRIMITIVE if the start time is either less than 0 or less than the start time of a previous segment.

Requirements

Requirement Value
Minimum supported client Windows 8, Windows 7 and Platform Update for Windows 7 [desktop apps | UWP apps]
Minimum supported server None supported
Target Platform Windows
Header uianimation.h
DLL UIAnimation.dll

See also

IUIAnimationPrimitiveInterpolation