10 changed files with 131 additions and 52 deletions
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace Avalonia.Animation |
|||
{ |
|||
/// <summary>
|
|||
/// Determines the playback direction of an animation.
|
|||
/// </summary>
|
|||
public enum Direction |
|||
{ |
|||
/// <summary>
|
|||
/// The animation is played normally.
|
|||
/// </summary>
|
|||
Normal, |
|||
|
|||
/// <summary>
|
|||
/// The animation is played in reverse direction.
|
|||
/// </summary>
|
|||
Reverse, |
|||
|
|||
/// <summary>
|
|||
/// The animation is played forwards first, then backwards.
|
|||
/// </summary>
|
|||
Alternate, |
|||
|
|||
/// <summary>
|
|||
/// The animation is played backwards first, then forwards.
|
|||
/// </summary>
|
|||
AlternateReverse |
|||
} |
|||
} |
|||
@ -0,0 +1,43 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using Avalonia.Collections; |
|||
using System.ComponentModel; |
|||
using Avalonia.Animation.Utils; |
|||
using System.Reactive.Linq; |
|||
using System.Linq; |
|||
using Avalonia.Data; |
|||
using System.Reactive.Disposables; |
|||
|
|||
namespace Avalonia.Animation.Keyframes |
|||
{ |
|||
/// <summary>
|
|||
/// Represents a pair of keyframe, usually the
|
|||
/// Start and End keyframes of a <see cref="KeyFrames{T}"/> object.
|
|||
/// </summary>
|
|||
public struct KeyFramePair<T> |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// Initializes this <see cref="KeyFramePair{T}"/>
|
|||
/// </summary>
|
|||
/// <param name="FirstKeyFrame"></param>
|
|||
/// <param name="LastKeyFrame"></param>
|
|||
public KeyFramePair(KeyValuePair<double, T> FirstKeyFrame, KeyValuePair<double, T> LastKeyFrame) : this() |
|||
{ |
|||
this.FirstKeyFrame = FirstKeyFrame; |
|||
this.SecondKeyFrame = LastKeyFrame; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// First <see cref="KeyFrame"/> object.
|
|||
/// </summary>
|
|||
public KeyValuePair<double, T> FirstKeyFrame { get; private set; } |
|||
|
|||
/// <summary>
|
|||
/// Second <see cref="KeyFrame"/> object.
|
|||
/// </summary>
|
|||
public KeyValuePair<double, T> SecondKeyFrame { get; private set; } |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace Avalonia.Animation |
|||
{ |
|||
public enum RepeatBehavior |
|||
{ |
|||
None, |
|||
Repeat, |
|||
Loop |
|||
} |
|||
} |
|||
Loading…
Reference in new issue