示例#1
0
 static void PrintChromaticityCoordinates(ChromaticityCoordinates coordinates)
 {
     Console.WriteLine("CIE chromaticity coordinates");
     Console.WriteLine($"Red:                                                 ({coordinates.RedX}, {coordinates.RedY})");
     Console.WriteLine($"Green:                                               ({coordinates.GreenX}, {coordinates.GreenY})");
     Console.WriteLine($"Blue:                                                ({coordinates.BlueX}, {coordinates.BlueY})");
     Console.WriteLine($"White:                                               ({coordinates.WhiteX}, {coordinates.WhiteY})");
 }
示例#2
0
 protected bool Equals(IRGBWorkingSpace other)
 {
     if (other == null)
     {
         throw new ArgumentNullException("other");
     }
     return(Equals(WhitePoint, other.WhitePoint) && ChromaticityCoordinates.Equals(other.ChromaticityCoordinates) && Equals(Companding, other.Companding));
 }
示例#3
0
 /// <inheritdoc cref="object" />
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = WhitePoint.GetHashCode();
         hashCode = (hashCode * 397) ^ ChromaticityCoordinates.GetHashCode();
         hashCode = (hashCode * 397) ^ (Companding != null ? Companding.GetHashCode() : 0);
         return(hashCode);
     }
 }
示例#4
0
        /// <inheritdoc cref="object" />
        public bool Equals(IRGBWorkingSpace other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Equals(WhitePoint, other.WhitePoint) &&
                   ChromaticityCoordinates.Equals(other.ChromaticityCoordinates) &&
                   Companding.Equals(other.Companding));
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public bool Equals(ChromaticityCoordinates other) => _r.Equals(other._r) && _g.Equals(other._g) && _b.Equals(other._b);