Esempio n. 1
0
        /// <summary>
        /// Initializes a new RCColor with the specified RCColor.
        /// </summary>
        /// <param name="other">The RCColor to initialize with.</param>
        public RCColor(RCColor other)
        {
            if (!other.isDefined)
            {
                throw new ArgumentNullException("other");
            }

            this.isDefined = true;
            this.r         = other.r;
            this.g         = other.g;
            this.b         = other.b;
        }
Esempio n. 2
0
 /// <summary>
 /// Checks whether this RCColor contains the same components as the specified RCColor.
 /// </summary>
 /// <param name="other">The RCColor to test.</param>
 /// <returns>True if other RCColor has the same components as this RCColor.</returns>
 public bool Equals(RCColor other)
 {
     return((!this.isDefined && !other.isDefined) ||
            (this.isDefined && other.isDefined && this.r == other.r && this.g == other.g && this.b == other.b));
 }