System.Drawing.Color.GetHashCode()

Here are the examples of the csharp api class System.Drawing.Color.GetHashCode() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

24 Examples 7

1. Example

Project: logwizard
Source File: font_info.cs
public override int GetHashCode() {
            unchecked {
                var hashCode = match_fg.GetHashCode();
                hashCode = (hashCode * 397) ^ match_bg.GetHashCode();
                hashCode = (hashCode * 397) ^ fg.GetHashCode();
                hashCode = (hashCode * 397) ^ bg.GetHashCode();
                return hashCode;
            }
        }

2. Example

Project: OpenLiveWriter
Source File: BackgroundColorTextStyle.cs
public override int GetHashCode()
        {
            return BackgroundColor.GetHashCode();
        }

3. Example

Project: OpenLiveWriter
Source File: FontColorTextStyle.cs
public override int GetHashCode()
        {
            return FontColor.GetHashCode();
        }

4. Example

Project: OpenRA
Source File: Pair.cs
public int GetHashCode(Color obj) { return obj.GetHashCode(); }

5. Example

Project: poderosa
Source File: RenderProfile.cs
public override int GetHashCode() {
            return _color.GetHashCode();
        }

6. Example

Project: Report.NET
Source File: BrushProp.cs
public override Int32 GetHashCode() {
      return _color.GetHashCode();
    }

7. Example

Project: ReoGrid
Source File: ColorPickerPanel.cs
public override int GetHashCode()
		{
			return color.GetHashCode();
		}

8. Example

Project: ReoGrid
Source File: ColorPickerPanel.cs
public override int GetHashCode()
		{
			return foreColor.GetHashCode() ^ backColor.GetHashCode() ^ (short)hatchStyle;
		}

9. Example

Project: ClearCanvas
Source File: TrackSlider.VisualStyle.cs
public override int GetHashCode()
		{
			return _hue.GetHashCode() ^ -0x515897BC;
		}

10. Example

Project: Cyotek.Windows.Forms.ColorPicker
Source File: ColorCollection.cs
public override int GetHashCode()
    {
      // http://stackoverflow.com/a/10567511/148962

      return this.Aggregate(0, (current, value) => current ^ value.GetHashCode());
    }

11. Example

Project: roguelike
Source File: MapRendererSDLDotNet.cs
public override int GetHashCode()
        {
            return 17 * Id.GetHashCode() + 17 * ForegroundColor.GetHashCode() + BackgroundColor.GetHashCode();
        }

12. Example

Project: mbunit-v3
Source File: Style.cs
public override int GetHashCode()
        {
            if (hashCode != 0)
                return hashCode;

            int newHashCode = font.GetHashCode()
                ^ color.GetHashCode()
                ^ tabStopRuler.GetHashCode()
                ^ (wordWrap ? 0x4000000 : 0)
                ^ (leftMargin << 5)
                ^ (rightMargin << 10)
                ^ (firstLineIndent << 15);
            if (newHashCode == 0)
                newHashCode = 1;
            hashCode = newHashCode;
            return hashCode;
        }

13. Example

Project: Aurora
Source File: AnimationLine.cs
public override int GetHashCode()
        {
            unchecked
            {
                int hash = 17;
                hash = hash * 23 + _color.GetHashCode();
                hash = hash * 23 + _end_color.GetHashCode();
                hash = hash * 23 + _start_point.GetHashCode();
                hash = hash * 23 + _end_point.GetHashCode();
                hash = hash * 23 + _width.GetHashCode();
                hash = hash * 23 + _duration.GetHashCode();
                hash = hash * 23 + _angle.GetHashCode();
                return hash;
            }
        }

14. Example

Project: Outliner-3.0
Source File: SerializableColor.cs
public override int GetHashCode()
   {
      return this.isGuiColor.GetHashCode() ^ this.guiColor.GetHashCode() ^ this.color.GetHashCode();
   }

15. Example

Project: Report.NET
Source File: PenProp.cs
public override Int32 GetHashCode() {
      return _rWidth.GetHashCode() ^ _color.GetHashCode() ^ _rPatternOn.GetHashCode() ^ _rPatternOff.GetHashCode();
    }

16. Example

Project: ClearCanvas
Source File: GeometricShutterCache.cs
public override int GetHashCode()
			{
				int hash = 0x5808A899;
				foreach (GeometricShutter shutter in Shutters)
					hash ^= shutter.GetHashCode();

				hash ^= ImageRectangle.GetHashCode();
				hash ^= FillColor.GetHashCode();
				return hash;
			}

17. Example

Project: ClearCanvas
Source File: GdiObjectFactory.cs
private int ComputeHash()
        {
            unchecked
            {
                int hash = 31;
                hash = hash * 486187739 + (ColorName ?? String.Empty).GetHashCode();
                hash = hash * 486187739 + Color.GetHashCode();
                return hash;
            }
        }

18. Example

Project: JustUO
Source File: ToolbarEntry.cs
public override int GetHashCode()
		{
			unchecked
			{
				int hashCode = (Value != null ? Value.GetHashCode() : 0);
				hashCode = (hashCode * 397) ^ (Label != null ? Label.GetHashCode() : 0);
				hashCode = (hashCode * 397) ^ LabelColor.GetHashCode();
				hashCode = (hashCode * 397) ^ CanEdit.GetHashCode();
				hashCode = (hashCode * 397) ^ CanDelete.GetHashCode();
				hashCode = (hashCode * 397) ^ Highlight.GetHashCode();
				return hashCode;
			}
		}

19. Example

Project: SM64DSe
Source File: ModelBase.cs
public override int GetHashCode()
            {
                int hash = 13;
                hash = (hash * 7) + m_Position.GetHashCode();
                hash = (hash * 7) + ((m_TextureCoordinate != null) ? m_TextureCoordinate.GetHashCode() : -1);
                hash = (hash * 7) + ((m_Normal != null) ? m_TextureCoordinate.GetHashCode() : -1);
                hash = (hash * 7) + m_VertexColour.GetHashCode();
                hash = (hash * 7) + m_VertexBoneIndex * 397;
                return hash;
            }

20. Example

Project: ClosedXML
Source File: XLColor_Public.cs
public override int GetHashCode()
        {
            if (_hashCode == 0)
            {
                if (_colorType == XLColorType.Color)
                    _hashCode = _color.GetHashCode();
                else if (_colorType == XLColorType.Theme)
                    _hashCode = _themeColor.GetHashCode() ^ _themeTint.GetHashCode();
                else
                    _hashCode = _indexed;
            }

            return _hashCode;
        }

21. Example

Project: logwizard
Source File: text_part.cs
public override int GetHashCode() {
            unchecked {
                var hashCode = fg.GetHashCode();

                hashCode = (hashCode * 397) ^ start_.GetHashCode();
                hashCode = (hashCode * 397) ^ len_.GetHashCode();

                hashCode = (hashCode * 397) ^ bg.GetHashCode();
                hashCode = (hashCode * 397) ^ bold.GetHashCode();
                hashCode = (hashCode * 397) ^ italic.GetHashCode();
                hashCode = (hashCode * 397) ^ (font_name != null ? font_name.GetHashCode() : 0);
                return hashCode;
            }
        }

22. Example

Project: Aurora
Source File: AnimationFrame.cs
public override int GetHashCode()
        {
            unchecked
            {
                int hash = 17;
                hash = hash * 23 + _color.GetHashCode();
                hash = hash * 23 + _dimension.GetHashCode();
                hash = hash * 23 + _width.GetHashCode();
                hash = hash * 23 + _duration.GetHashCode();
                return hash;
            }
        }

23. Example

Project: LiveSplit
Source File: SettingsHelper.cs
public static int CreateSetting(XmlDocument document, XmlElement parent, string name, Color color)
        {
            if (document != null)
            {
                var element = document.CreateElement(name);
                element.InnerText = color.ToArgb().ToString("X8");
                parent.AppendChild(element);
            }
            return color.GetHashCode();
        }

24. Example

Project: Chromatics
Source File: AmbienceInterface.cs
private static void FillBufferFromScreenWith(byte[] buffer, Dictionary<int, Collection<Point>> coordinates, Func<int, int> LedIterator, int ledCount)
        {
            Debug.WriteLine(AmbIndex[0].GetHashCode());
            AmbIndex.Clear();

            for (int ledIndex = 0; ledIndex < ledCount; ledIndex++)
            {
                totalRed = totalGreen = totalBlue = 0;
                int totalColorsParsed = 0;

                for (int coordinateIndex = 0; coordinateIndex < coordinates[ledIndex].Count; coordinateIndex++)
                {
                    Color currentColor = bmpScreenshot.GetPixel(coordinates[ledIndex][coordinateIndex].X, coordinates[ledIndex][coordinateIndex].Y);
                    totalRed += currentColor.R;
                    totalGreen += currentColor.G;
                    totalBlue += currentColor.B;
                    totalColorsParsed++;
                }

                AmbIndex.Add(Color.FromArgb(totalRed / totalColorsParsed, totalGreen / totalColorsParsed, totalBlue / totalColorsParsed));
                //SetOneLedToColor(buffer, LedIterator(ledIndex), Color.FromArgb(totalRed / totalColorsParsed, totalGreen / totalColorsParsed, totalBlue / totalColorsParsed));
            }
        }