Esempio n. 1
0
        /// <summary>
        /// Returns the HashCode for this StylusPoint
        /// </summary>
        /// <returns>
        /// int - the HashCode for this StylusPoint
        /// </returns>
        public override int GetHashCode()
        {
            int hash =
                _x.GetHashCode() ^
                _y.GetHashCode() ^
                _pressureFactor.GetHashCode();

            if (_stylusPointDescription != null)
            {
                hash ^= _stylusPointDescription.GetHashCode();
            }

            if (_additionalValues != null)
            {
                for (int x = 0; x < _additionalValues.Length; x++)
                {
                    hash ^= _additionalValues[x]; //don't call GetHashCode on integers, it just returns the int
                }
            }

            return(hash);
        }