Пример #1
0
 internal override double OnApply(TimeSpan duration)
 {
     return(EasingManager.ApplyEasing(
                this.Easing,
                duration.TotalMilliseconds,
                this.From,
                this.To - this.From,
                this.Duration.TotalMilliseconds));
 }
Пример #2
0
        internal override SKColor OnApply(TimeSpan duration)
        {
            double fromValue = this.From.ToInt();
            double toValue   = this.To.ToInt();

            uint animateValue = (uint)EasingManager.ApplyEasing(
                this.Easing,
                duration.TotalMilliseconds,
                fromValue,
                fromValue - toValue,
                this.Duration.TotalMilliseconds);

            return(new SKColor(animateValue));
        }
Пример #3
0
        internal override SKPoint OnApply(TimeSpan duration)
        {
            double x = EasingManager.ApplyEasing(
                this.Easing,
                duration.TotalMilliseconds,
                this.From.X,
                this.To.X - this.From.X,
                this.Duration.TotalMilliseconds);

            double y = EasingManager.ApplyEasing(
                this.Easing,
                duration.TotalMilliseconds,
                this.From.Y,
                this.To.Y - this.From.Y,
                this.Duration.TotalMilliseconds);

            return(new SKPoint((float)x, (float)y));
        }
Пример #4
0
        internal override SKSize OnApply(TimeSpan duration)
        {
            double width = EasingManager.ApplyEasing(
                this.Easing,
                duration.TotalMilliseconds,
                this.From.Width,
                this.To.Width - this.From.Width,
                this.Duration.TotalMilliseconds);

            double height = EasingManager.ApplyEasing(
                this.Easing,
                duration.TotalMilliseconds,
                this.From.Height,
                this.To.Height - this.From.Height,
                this.Duration.TotalMilliseconds);

            return(new SKSize((float)width, (float)height));
        }