private static string MakeLazyWestKey(LFont font) { if (lazyKey == null) { lazyKey = new StringBuilder(); lazyKey.Append(font.GetFontName().ToLower()); lazyKey.Append(font.GetStyle()); lazyKey.Append(font.GetSize()); } else { lazyKey.Clear(); lazyKey.Append(font.GetFontName().ToLower()); lazyKey.Append(font.GetStyle()); lazyKey.Append(font.GetSize()); } return(lazyKey.ToString()); }
public static string MakeStringLazyKey(LFont font, string text) { int hashCode = 0; hashCode = LSystem.Unite(hashCode, font.GetSize()); hashCode = LSystem.Unite(hashCode, font.GetStyle()); if (lazyKey == null) { lazyKey = new StringBuilder(); lazyKey.Append(font.GetFontName().ToLower()); lazyKey.Append(hashCode); lazyKey.Append(split); lazyKey.Append(text); } else { lazyKey.Clear(); lazyKey.Append(font.GetFontName().ToLower()); lazyKey.Append(hashCode); lazyKey.Append(split); lazyKey.Append(text); } return(lazyKey.ToString()); }
private static string MakeLazyWestKey(LFont font) { if (lazyKey == null) { lazyKey = new StringBuilder(); lazyKey.Append(font.GetFontName().ToLower()); lazyKey.Append(font.GetStyle()); lazyKey.Append(font.GetSize()); } else { lazyKey.Clear(); lazyKey.Append(font.GetFontName().ToLower()); lazyKey.Append(font.GetStyle()); lazyKey.Append(font.GetSize()); } return lazyKey.ToString(); }
public static string MakeStringLazyKey(LFont font, string text) { int hashCode = 0; hashCode = LSystem.Unite(hashCode, font.GetSize()); hashCode = LSystem.Unite(hashCode, font.GetStyle()); if (lazyKey == null) { lazyKey = new StringBuilder(); lazyKey.Append(font.GetFontName().ToLower()); lazyKey.Append(hashCode); lazyKey.Append(split); lazyKey.Append(text); } else { lazyKey.Clear(); lazyKey.Append(font.GetFontName().ToLower()); lazyKey.Append(hashCode); lazyKey.Append(split); lazyKey.Append(text); } return lazyKey.ToString(); }