예제 #1
0
 /// <summary>
 /// Interpolates the sizes.
 /// </summary>
 /// <param name="size1">The size1.</param>
 /// <param name="size2">The size2.</param>
 /// <param name="percent">The percent.</param>
 /// <returns>Size.</returns>
 public static Size InterpolateSizes(Size size1, Size size2, double percent)
 {
     return(new Size(ZeroitSpecAnimatorBase.InterpolateIntegerValues(size1.Width, size2.Width, percent), ZeroitSpecAnimatorBase.InterpolateIntegerValues(size1.Height, size2.Height, percent)));
 }
예제 #2
0
 /// <summary>
 /// Interpolates the colors.
 /// </summary>
 /// <param name="color1">The color1.</param>
 /// <param name="color2">The color2.</param>
 /// <param name="percent">The percent.</param>
 /// <returns>Color.</returns>
 public static Color InterpolateColors(Color color1, Color color2, double percent)
 {
     return(Color.FromArgb(ZeroitSpecAnimatorBase.InterpolateIntegerValues((int)color1.A, (int)color2.A, percent), ZeroitSpecAnimatorBase.InterpolateIntegerValues((int)color1.R, (int)color2.R, percent), ZeroitSpecAnimatorBase.InterpolateIntegerValues((int)color1.G, (int)color2.G, percent), ZeroitSpecAnimatorBase.InterpolateIntegerValues((int)color1.B, (int)color2.B, percent)));
 }
예제 #3
0
 /// <summary>
 /// Interpolates the points.
 /// </summary>
 /// <param name="point1">The point1.</param>
 /// <param name="point2">The point2.</param>
 /// <param name="percent">The percent.</param>
 /// <returns>Point.</returns>
 public static Point InterpolatePoints(Point point1, Point point2, double percent)
 {
     return(new Point(ZeroitSpecAnimatorBase.InterpolateIntegerValues(point1.X, point2.X, percent), ZeroitSpecAnimatorBase.InterpolateIntegerValues(point1.Y, point2.Y, percent)));
 }
 /// <summary>
 /// Gets the value for step.
 /// </summary>
 /// <param name="step">The step.</param>
 /// <returns>System.Object.</returns>
 protected override object GetValueForStep(double step)
 {
     return((object)this.CheckValue(ZeroitSpecAnimatorBase.InterpolateIntegerValues(this._startValue, this._endValue, step)));
 }