PointAnimator.cs 446 B

1234567891011121314151617
  1. using System;
  2. using Avalonia.Logging;
  3. using Avalonia.Media;
  4. namespace Avalonia.Animation.Animators
  5. {
  6. /// <summary>
  7. /// Animator that handles <see cref="Point"/> properties.
  8. /// </summary>
  9. internal class PointAnimator : Animator<Point>
  10. {
  11. public override Point Interpolate(double progress, Point oldValue, Point newValue)
  12. {
  13. return ((newValue - oldValue) * progress) + oldValue;
  14. }
  15. }
  16. }