public override int GetHashCode()
        {
            var hashCode = -2037960190;

            hashCode = hashCode * -1521134295 + color.GetHashCode();
            hashCode = hashCode * -1521134295 + font.GetHashCode();
            hashCode = hashCode * -1521134295 + fontSize.GetHashCode();
            hashCode = hashCode * -1521134295 + unityFontStyle.GetHashCode();
            hashCode = hashCode * -1521134295 + unityTextAlign.GetHashCode();
            hashCode = hashCode * -1521134295 + visibility.GetHashCode();
            hashCode = hashCode * -1521134295 + whiteSpace.GetHashCode();
            return(hashCode);
        }
Example #2
0
        private static Font getFont(StyleFont styleFont)
        {
            if (styleFont == null)
            {
                return(null);
            }

            FontLookupKey key = new FontLookupKey(styleFont.GetHashCode());

            Font font;

            _fontCache.TryGetValue(key, out font);
            return(font);
        }
Example #3
0
 private static void saveFont(StyleFont styleFont, Font font)
 {
     _fontCache[new FontLookupKey(styleFont.GetHashCode())] = font;
 }