/// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (FileId != null)
         {
             hashCode = hashCode * 59 + FileId.GetHashCode();
         }
         if (PageRange != null)
         {
             hashCode = hashCode * 59 + PageRange.GetHashCode();
         }
         hashCode = hashCode * 59 + RoiLeft.GetHashCode();
         hashCode = hashCode * 59 + RoiTop.GetHashCode();
         hashCode = hashCode * 59 + RoiWidth.GetHashCode();
         hashCode = hashCode * 59 + RoiHeight.GetHashCode();
         hashCode = hashCode * 59 + GammaCorrection.GetHashCode();
         hashCode = hashCode * 59 + Brightness.GetHashCode();
         hashCode = hashCode * 59 + Contrast.GetHashCode();
         hashCode = hashCode * 59 + Saturation.GetHashCode();
         hashCode = hashCode * 59 + AutoContrastEnhancement.GetHashCode();
         hashCode = hashCode * 59 + ContrastHistogramStretch.GetHashCode();
         return(hashCode);
     }
 }
示例#2
0
        /// <summary>
        /// このオブジェクトのハッシュ値を得る。
        /// </summary>
        /// <returns>ハッシュ値</returns>
        public override int GetHashCode()
        {
            int hashCode = -1617763555;

            hashCode = hashCode * -1521134295 + Alpha.GetHashCode();
            hashCode = hashCode * -1521134295 + Hue.GetHashCode();
            hashCode = hashCode * -1521134295 + Saturation.GetHashCode();
            hashCode = hashCode * -1521134295 + Lightness.GetHashCode();
            return(hashCode);
        }
示例#3
0
        /// <summary>
        /// このオブジェクトのハッシュ値を得る。
        /// </summary>
        /// <returns>ハッシュ値</returns>
        public override int GetHashCode()
        {
            int hashCode = -1269385161;

            hashCode = hashCode * -1521134295 + Alpha.GetHashCode();
            hashCode = hashCode * -1521134295 + Hue.GetHashCode();
            hashCode = hashCode * -1521134295 + Saturation.GetHashCode();
            hashCode = hashCode * -1521134295 + Value.GetHashCode();
            return(hashCode);
        }
示例#4
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="ColorInfo" /> struct.
        /// </summary>
        /// <param name="color">The color.</param>
        public ColorInfo(Color color) : this()
        {
            Color = color;
            Count = 1;

            Hue        = color.GetHue();
            Saturation = color.GetSaturation();
            Brightness = color.GetBrightness();

            HueHashCode        = Hue.GetHashCode();
            SaturationHashCode = Saturation.GetHashCode();
            BrightnessHashCode = Brightness.GetHashCode();
        }
示例#5
0
 //item.PubCode, item.FName, item.LName, item.Company, item.Title, item.Address, item.Email, item.Phone
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int mult = 486187739;
         int hash = 17;
         // Suitable nullity checks etc, of course :)
         hash = hash * mult + Hue.GetHashCode();
         hash = hash * mult + Saturation.GetHashCode();
         hash = hash * mult + Value.GetHashCode();
         hash = hash * mult + Color.GetHashCode();
         return(hash);
     }
 }
示例#6
0
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hash = 37;

                hash = hash * 53 + Hue.GetHashCode();
                hash = hash * 53 + Saturation.GetHashCode();
                hash = hash * 53 + Lightness.GetHashCode();
                hash = hash * 53 + Alpha;

                return(hash);
            }
        }
示例#7
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
 public override int GetHashCode()
 {
     return(Hue.GetHashCode() ^ Saturation.GetHashCode() ^ Brightness.GetHashCode());
 }
示例#8
0
文件: HSL.cs 项目: yuyu2you/Caf.CMS
 public override int GetHashCode()
 {
     return(Hue.GetHashCode() ^ Saturation.GetHashCode() ^ Luminance.GetHashCode());
 }
示例#9
0
 public override int GetHashCode()
 {
     return(Hue.GetHashCode() ^ Saturation.GetHashCode() ^ Value.GetHashCode());
 }
示例#10
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (CameraDev.Length != 0)
            {
                hash ^= CameraDev.GetHashCode();
            }
            if (FrameId.Length != 0)
            {
                hash ^= FrameId.GetHashCode();
            }
            if (PixelFormat.Length != 0)
            {
                hash ^= PixelFormat.GetHashCode();
            }
            if (IoMethod != 0)
            {
                hash ^= IoMethod.GetHashCode();
            }
            if (Width != 0)
            {
                hash ^= Width.GetHashCode();
            }
            if (Height != 0)
            {
                hash ^= Height.GetHashCode();
            }
            if (FrameRate != 0)
            {
                hash ^= FrameRate.GetHashCode();
            }
            if (Monochrome != false)
            {
                hash ^= Monochrome.GetHashCode();
            }
            if (Brightness != 0)
            {
                hash ^= Brightness.GetHashCode();
            }
            if (Contrast != 0)
            {
                hash ^= Contrast.GetHashCode();
            }
            if (Saturation != 0)
            {
                hash ^= Saturation.GetHashCode();
            }
            if (Sharpness != 0)
            {
                hash ^= Sharpness.GetHashCode();
            }
            if (Gain != 0)
            {
                hash ^= Gain.GetHashCode();
            }
            if (AutoFocus != false)
            {
                hash ^= AutoFocus.GetHashCode();
            }
            if (Focus != 0)
            {
                hash ^= Focus.GetHashCode();
            }
            if (AutoExposure != false)
            {
                hash ^= AutoExposure.GetHashCode();
            }
            if (Exposure != 0)
            {
                hash ^= Exposure.GetHashCode();
            }
            if (AutoWhiteBalance != false)
            {
                hash ^= AutoWhiteBalance.GetHashCode();
            }
            if (WhiteBalance != 0)
            {
                hash ^= WhiteBalance.GetHashCode();
            }
            if (BytesPerPixel != 0)
            {
                hash ^= BytesPerPixel.GetHashCode();
            }
            if (TriggerInternal != 0)
            {
                hash ^= TriggerInternal.GetHashCode();
            }
            if (TriggerFps != 0)
            {
                hash ^= TriggerFps.GetHashCode();
            }
            if (ChannelName.Length != 0)
            {
                hash ^= ChannelName.GetHashCode();
            }
            if (DeviceWaitMs != 0)
            {
                hash ^= DeviceWaitMs.GetHashCode();
            }
            if (SpinRate != 0)
            {
                hash ^= SpinRate.GetHashCode();
            }
            if (OutputType != 0)
            {
                hash ^= OutputType.GetHashCode();
            }
            if (compressConf_ != null)
            {
                hash ^= CompressConf.GetHashCode();
            }
            return(hash);
        }