本文整理汇总了C++中Timeline::GetBeginTime方法的典型用法代码示例。如果您正苦于以下问题:C++ Timeline::GetBeginTime方法的具体用法?C++ Timeline::GetBeginTime怎么用?C++ Timeline::GetBeginTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timeline
的用法示例。
在下文中一共展示了Timeline::GetBeginTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FromSeconds
Duration
ParallelTimeline::GetNaturalDurationCore (Clock *clock)
{
TimelineCollection *collection = GetChildren ();
Duration d = Duration::Automatic;
TimeSpan duration_span = 0;
Timeline *timeline;
int count = collection->GetCount ();
if (count == 0)
return Duration::FromSeconds (0);
for (int i = 0; i < count; i++) {
timeline = collection->GetValueAt (i)->AsTimeline ();
Duration duration = timeline->GetNaturalDuration (clock);
if (duration.IsAutomatic())
continue;
if (duration.IsForever())
return Duration::Forever;
TimeSpan span = duration.GetTimeSpan ();
RepeatBehavior *repeat = timeline->GetRepeatBehavior ();
if (repeat->IsForever())
return Duration::Forever;
if (repeat->HasCount ())
span = (TimeSpan) (span * repeat->GetCount ());
if (timeline->GetAutoReverse ())
span *= 2;
// If we have duration-base repeat behavior,
// clamp/up our span to that.
if (repeat->HasDuration ())
span = repeat->GetDuration ();
if (span != 0)
span = (TimeSpan)(span / timeline->GetSpeedRatio());
span += timeline->GetBeginTime ();
if (duration_span <= span) {
duration_span = span;
d = Duration (duration_span);
}
}
return d;
}