/// <summary> /// Create correspondent hash code for the object /// </summary> /// <returns>object hash code</returns> public override int GetHashCode() { int hash = _fontFamily.GetHashCode(); if (_fallbackFontFamily != null) { hash = HashFn.HashMultiply(hash) + _fallbackFontFamily.GetHashCode(); } hash = HashFn.HashMultiply(hash) + _style.GetHashCode(); hash = HashFn.HashMultiply(hash) + _weight.GetHashCode(); hash = HashFn.HashMultiply(hash) + _stretch.GetHashCode(); return(HashFn.HashScramble(hash)); }
public override int GetHashCode() { return(FontFamily.GetHashCode() ^ FontSize.GetHashCode() ^ FontWeight.GetHashCode() ^ FontStretch.GetHashCode() ^ FontStyle.GetHashCode()); }
private Int32 Hash(FontFamily ff, FontStyle style, FontWeight weight, FontStretch stretch) { unchecked { return(ff.GetHashCode() + style.GetHashCode() * 1229 + weight.GetHashCode() * 20011 + stretch.GetHashCode() * 200003); } }