IUIAnimationTransitionLibrary2::CreateSinusoidalTransitionFromRange method (uianimation.h)

Creates a sinusoidal-range scalar 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] IUIAnimationTransition2 **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] slope

The slope at the start of the transition.

[out] transition

The new sinusoidal-range transition.

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

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 following figure shows the change in value over time of an animation variable 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 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

IUIAnimationTransition2

IUIAnimationTransitionLibrary2