IUIAnimationPrimitiveInterpolation::AddSinusoidal method (uianimation.h)

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

Syntax

HRESULT AddSinusoidal(
  [in] UINT                 dimension,
  [in] UI_ANIMATION_SECONDS beginOffset,
  [in] FLOAT                bias,
  [in] FLOAT                amplitude,
  [in] FLOAT                frequency,
  [in] FLOAT                phase
);

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] bias

The bias constant in the sinusoidal function.

[in] amplitude

The amplitude constant in the sinusoidal function.

[in] frequency

The frequency constant in the sinusoidal function.

[in] phase

The phase constant in the sinusoidal function.

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

Defined by the function Y(t) = bias + amplitudesin(360frequency*t + phase), where 'sin' is the sin of an angle specified in degrees (for example, sin(n + 360) == sin(n) for any real number 'n').

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 only]
Minimum supported server None supported
Target Platform Windows
Header uianimation.h
DLL UIAnimation.dll

See also

IUIAnimationPrimitiveInterpolation