Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Path2D"/> class.
 /// </summary>
 /// <param name="startX">
 /// The starting value of X.
 /// </param>
 /// <param name="endX">
 /// The ending value of X.
 /// </param>
 /// <param name="startY">
 /// The starting value of Y.
 /// </param>
 /// <param name="endY">
 /// The ending value of y.
 /// </param>
 /// <param name="durationX">
 /// The duration of X changes.
 /// </param>
 /// <param name="durationY">
 /// The duration of Y changes.
 /// </param>
 /// <param name="delayX">
 /// The delay of X changes.
 /// </param>
 /// <param name="delayY">
 /// The delay of Y changes.
 /// </param>
 /// <param name="functionX">
 /// The animation function for X.
 /// </param>
 /// <param name="functionY">
 /// The animation function for Y.
 /// </param>
 public Path2D(
     float startX, 
     float endX, 
     float startY, 
     float endY, 
     float durationX, 
     float durationY, 
     float delayX = 0, 
     float delayY = 0, 
     Functions.Function functionX = null, 
     Functions.Function functionY = null)
     : this(
         new Path(startX, endX, durationX, delayX, functionX), 
         new Path(startY, endY, durationY, delayY, functionY))
 {
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Path"/> class.
        /// </summary>
        /// <param name="start">
        /// The starting value.
        /// </param>
        /// <param name="end">
        /// The ending value.
        /// </param>
        /// <param name="duration">
        /// The duration of changes.
        /// </param>
        /// <param name="delay">
        /// The delay of changes.
        /// </param>
        /// <param name="function">
        /// The animation function.
        /// </param>
        /// <exception cref="ArgumentOutOfRangeException">
        /// Duration is less than zero
        /// </exception>
        public Path(float start, float end, float duration, float delay = 0, Functions.Function function = null)
        {
            this.Start = start;
            this.End = end;
            this.Change = this.End - this.Start;
            if (this.Duration < 0)
            {
                throw new ArgumentOutOfRangeException();
            }

            this.Duration = duration;
            this.Function = function;
            this.Delay = delay;
            if (this.Function == null)
            {
                this.Function = Functions.Liner;
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Path2D"/> class.
 /// </summary>
 /// <param name="start">
 /// The starting Point/Location
 /// </param>
 /// <param name="end">
 /// The ending Point/Location
 /// </param>
 /// <param name="duration">
 /// The duration of changes.
 /// </param>
 /// <param name="delay">
 /// The delay of changes.
 /// </param>
 /// <param name="function">
 /// The animation function.
 /// </param>
 // ReSharper disable once UnusedMember.Global
 public Path2D(Point start, Point end, float duration, float delay = 0, Functions.Function function = null)
     : this(
         new Path(start.X, end.X, duration, delay, function), 
         new Path(start.Y, end.Y, duration, delay, function))
 {
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Path2D"/> class.
 /// </summary>
 /// <param name="start">
 /// The starting Size.
 /// </param>
 /// <param name="end">
 /// The ending Size.
 /// </param>
 /// <param name="duration">
 /// The duration of changes.
 /// </param>
 /// <param name="delay">
 /// The delay of changes.
 /// </param>
 /// <param name="function">
 /// The animation function.
 /// </param>
 // ReSharper disable once UnusedMember.Global
 public Path2D(Size start, Size end, float duration, float delay = 0, Functions.Function function = null)
     : this(
         new Path(start.Width, end.Width, duration, delay, function), 
         new Path(start.Height, end.Height, duration, delay, function))
 {
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Path2D"/> class.
 /// </summary>
 /// <param name="startX">
 /// The starting value of X.
 /// </param>
 /// <param name="endX">
 /// The ending value of X.
 /// </param>
 /// <param name="startY">
 /// The starting value of Y.
 /// </param>
 /// <param name="endY">
 /// The ending value of y.
 /// </param>
 /// <param name="duration">
 /// The duration of changes.
 /// </param>
 /// <param name="delay">
 /// The delay of changes.
 /// </param>
 /// <param name="function">
 /// The animation function.
 /// </param>
 // ReSharper disable once UnusedMember.Global
 public Path2D(
     float startX, 
     float endX, 
     float startY, 
     float endY, 
     float duration, 
     float delay = 0, 
     Functions.Function function = null)
     : this(new Path(startX, endX, duration, delay, function), new Path(startY, endY, duration, delay, function))
 {
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Path3D"/> class.
 /// </summary>
 /// <param name="start">
 /// The start color
 /// </param>
 /// <param name="end">
 /// The end color
 /// </param>
 /// <param name="duration">
 /// The duration of changes
 /// </param>
 /// <param name="delay">
 /// The delay of changes.
 /// </param>
 /// <param name="function">
 /// The animation function.
 /// </param>
 public Path3D(Color start, Color end, float duration, float delay = 0, Functions.Function function = null)
     : this(
         new Path(start.R, end.R, duration, delay, function), 
         new Path(start.G, end.G, duration, delay, function), 
         new Path(start.B, end.B, duration, delay, function))
 {
 }