//=========================================================== // ISerializable //=========================================================== private FontManager(Serial::SerializationInfo info, Serial::StreamingContext context) { this.f = null; this.fontname = (string)info.GetValue("fontname", typeof(string)); this._size = info.GetSingle("_size"); this.style = (Gdi::FontStyle)info.GetValue("style", typeof(Gdi::FontStyle)); }
private static Gdi::Font CreateFont(string name, float size, Gdi::FontStyle style) { FontKey k = new FontKey(name, size, style); if (!fonts.ContainsKey(k)) { Gdi::Font f = new Gdi::Font(name, size, style, Gdi::GraphicsUnit.Pixel); fonts[k] = f; return(f); } return(fonts[k]); }
public FontKey(string facename, float size, Gdi::FontStyle style) { this.facename = facename; this.size = size; this.style = style; }