IUIAnimationTransitionLibrary::CreateSinusoidalTransitionFromRange method (uianimation.h)

Creates a sinusoidal-range transition, with a specified range of oscillation.

Syntax

HRESULT CreateSinusoidalTransitionFromRange(
  [in]  UI_ANIMATION_SECONDS   duration,
  [in]  DOUBLE                 minimumValue,
  [in]  DOUBLE                 maximumValue,
  [in]  UI_ANIMATION_SECONDS   period,
  [in]  UI_ANIMATION_SLOPE     slope,
  [out] IUIAnimationTransition **transition
);

Parameters

[in] duration

The duration of the transition.

[in] minimumValue

The value of the animation variable at a trough of the sinusoidal wave.

[in] maximumValue

The value of the animation variable at a peak of the sinusoidal wave.

[in] period

The period of oscillation of the sinusoidal wave, in seconds.

[in] slope

The slope at the start of the transition.

[out] transition

The new sinusoidal-range transition.

Return value

If the 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

The value of the animation variable fluctuates between the specified minimum and maximum values over the entire duration of a sinusodial-range transition. The slope parameter is used to disambiguate between the two possible sine waves specified by the other parameters.

The figure below shows the effect on an animation variable over time during a sinusoidal-range transition. Passing in the UI_ANIMATION_SLOPE_INCREASING enumeration value yields a wave like the solid curve shown in the figure, whereas the UI_ANIMATION_SLOPE_DECREASING value yields a wave like the dashed curve.

Diagram showing a sinusoidal-range transition

Requirements

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

See also

IUIAnimationTransition

IUIAnimationTransitionLibrary