Share via


IXRTimeline::GetSpeedRatio (Windows Embedded CE 6.0)

1/6/2010

This method retrieves the rate, in relation to its parent, at which time progresses for this timeline.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetSpeedRatio(
    float* pSpeedRatio
) = 0;

Parameters

  • pSpeedRatio
    [out] Pointer to a float value greater than 0 that specifies the rate at which time progresses for this timeline, relative to the speed of its parent.

    If this timeline is a root timeline in the visual tree, this value specifies the default timeline speed. The value is expressed as a factor where 1 represents regular speed, 2 is double speed, 0.5 is half-rate speed, and so on.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The speed ratio of a timeline does not affect when it begins playing. For child timelines, the begin time is relative to the animation properties of its parent storyboard. For more information on how to set when the timeline begins, see IXRTimeline::SetBeginTime.

You can apply momentary or variable speed changes to animations by using spline animations. With a spline animation, you can define a rate of speed during the animation that is constantly shifting.

If you animate with splined interpolation using spline key frames, you can achieve more realistic and fine-tuned timing effects, such as the acceleration and deceleration of objects. For more information, see IXRDoubleAnimationUsingKeyFrames.

.NET Framework Equivalent

System.Windows.Media.Animation.Timeline.SpeedRatio

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

IXRTimeline
IXRTimeline::SetSpeedRatio