Exemplo n.º 1
0
 //===========================================================
 //		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));
 }
Exemplo n.º 2
0
        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]);
        }
Exemplo n.º 3
0
 public FontKey(string facename, float size, Gdi::FontStyle style)
 {
     this.facename = facename;
     this.size     = size;
     this.style    = style;
 }