Esempio n. 1
0
 /// <summary>
 /// Creates the actual animator instance
 /// </summary>
 private static IValueAnimator CreateDouble(Timeline timeline, double startingValue, double targetValue)
 {
     if (timeline.GetIsDependantAnimation() || timeline.GetIsDurationZero())
     {
         return(new NativeValueAnimatorAdapter(ValueAnimator.OfFloat((float)startingValue, (float)targetValue)));
     }
     else
     {
         return(timeline.GetGPUAnimator(startingValue, targetValue));
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Animation should be hardware-bound if it is neither dependent, nor zero-duration.
 /// </summary>
 internal static bool GetIsHardwareAnimated(this Timeline timeline) => !timeline.GetIsDependantAnimation() && !timeline.GetIsDurationZero();