Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ColorF"/> class from a blend of two colors.
 /// </summary>
 /// <param name="source">The blend source color.</param>
 /// <param name="dest">The blend destination color.</param>
 /// <param name="opacity">The opacity value.</param>
 public ColorF(ColorF source, ColorF dest, float opacity)
 {
     _red   = MathFunctions.LinearInterpolation(source.Red, dest.Red, opacity);
     _green = MathFunctions.LinearInterpolation(source.Green, dest.Green, opacity);
     _blue  = MathFunctions.LinearInterpolation(source.Blue, dest.Blue, opacity);
 }