Exemplo n.º 1
0
 /// <summary>Raises the red, blue, and green channels of the specified <see cref="ColorRgb128Float" /> structure to the specified value.</summary>
 /// <param name="color">The <see cref="ColorRgb128Float" /> to be raised.</param>
 /// <param name="exponent">The exponent value.</param>
 /// <returns>A new <see cref="ColorRgb128Float" /> structure whose color values are the raised to the specified value.</returns>
 public static ColorRgb128Float Power(ColorRgb128Float color, double exponent)
 {
     return(new ColorRgb128Float((float)Math.Pow(color.R, exponent), (float)Math.Pow(color.G, exponent), (float)Math.Pow(color.B, exponent)));
 }
Exemplo n.º 2
0
 /// <summary>Creates a new <see cref="ColorRgb128Float" /> structure in ScRGB space by using the specified sRGB color.</summary>
 /// <param name="color">The <see cref="ColorRgb128Float"/> in sRGB space.</param>
 /// <returns>A <see cref="ColorRgb128Float" /> structure with the values in ScRGB space.</returns>
 public static ColorRgb128Float ScFromRgb(ColorRgb128Float color)
 {
     return(new ColorRgb128Float(sRgbToScRgb(color.R), sRgbToScRgb(color.G), sRgbToScRgb(color.B)));
 }
Exemplo n.º 3
0
 /// <summary>Divides a <see cref="ColorRgb128Float" /> structure by a <see cref="ColorRgb128Float" /> structure channel by channel.</summary>
 /// <param name="color1">The <see cref="ColorRgb128Float" /> structure to be divided.</param>
 /// <param name="color2">The <see cref="ColorRgb128Float" /> structure to divide the <paramref name="color1" />.</param>
 /// <returns>A new <see cref="ColorRgb128Float" /> structure whose color values are the results of the division operation channel by channel.</returns>
 public static ColorRgb128Float Divide(ColorRgb128Float color1, ColorRgb128Float color2)
 {
     return(color1 / color2);
 }
Exemplo n.º 4
0
 /// <summary>Divides the red, blue, and green channels of the specified <see cref="ColorRgb128Float" /> structure by the specified value.</summary>
 /// <param name="color">The <see cref="ColorRgb128Float" /> to be divided.</param>
 /// <param name="divider">The value to divide by.</param>
 /// <returns>A new <see cref="ColorRgb128Float" /> structure whose color values are the results of the division operation.</returns>
 public static ColorRgb128Float Divide(ColorRgb128Float color, float divider)
 {
     return(color / divider);
 }
Exemplo n.º 5
0
 /// <summary>Multiplies two <see cref="ColorRgb128Float" /> structures channel by channel.</summary>
 /// <param name="color">The first <see cref="ColorRgb128Float" /> structure to add.</param>
 /// <param name="coefficients">The second <see cref="ColorRgb128Float" /> structure to add.</param>
 /// <returns>A new <see cref="ColorRgb128Float" /> structure whose color values are the results of the multiplication operation channel by channel.</returns>
 public static ColorRgb128Float Multiply(ColorRgb128Float color, ColorRgb128Float coefficients)
 {
     return(color * coefficients);
 }
Exemplo n.º 6
0
 /// <summary>Subtracts a <see cref="ColorRgb128Float" /> structure from a <see cref="ColorRgb128Float" /> structure. </summary>
 /// <param name="color1">The <see cref="ColorRgb128Float" /> structure to be subtracted from.</param>
 /// <param name="color2">The <see cref="ColorRgb128Float" /> structure to subtract from <paramref name="color1" />.</param>
 /// <returns>A new <see cref="ColorRgb128Float" /> structure whose color values are the results of the subtraction operation.</returns>
 public static ColorRgb128Float Substract(ColorRgb128Float color1, ColorRgb128Float color2)
 {
     return(color1 - color2);
 }
Exemplo n.º 7
0
 /// <summary>Adds two <see cref="ColorRgb128Float"/> structures.</summary>
 /// <param name="color1">The first <see cref="ColorRgb128Float" /> structure to add.</param>
 /// <param name="color2">The second <see cref="ColorRgb128Float" /> structure to add.</param>
 /// <returns>A new <see cref="ColorRgb128Float" /> structure whose color values are the results of the addition operation.</returns>
 public static ColorRgb128Float Add(ColorRgb128Float color1, ColorRgb128Float color2)
 {
     return(color1 + color2);
 }