Пример #1
0
 public virtual void Clear()
 {
     this.ClearPens();
     this.ClearBrushes();
     this.ClearColors();
     this.ClearFonts();
     this.font      = null;
     this.fontInfos = null;
     this.Init();
 }
Пример #2
0
 public void Clear()
 {
     this.FreeBuffer();
     this._penPtr   = IntPtr.Zero;
     this._brushPtr = IntPtr.Zero;
     this.ClearPens();
     this.ClearBrushes();
     this.ClearColors();
     this.ClearFonts();
     this._font      = null;
     this._fontInfos = null;
     this.Init();
 }
Пример #3
0
 protected virtual void SelectFont(System.Drawing.Font font, System.Drawing.FontStyle fontStyle)
 {
     if (font != null)
     {
         this.font      = font;
         this.fontStyle = fontStyle;
         object fontKey = this.GetFontKey(font);
         this.fontInfos = (FontInfos)this.fontTable[fontKey];
         if (this.fontInfos == null)
         {
             this.fontInfos = this.CreateFontInfos(font);
             this.fontTable.Add(fontKey, this.fontInfos);
         }
         this.fontInfos.InitStyle(font.Style);
     }
 }
Пример #4
0
 private void SelectFont(Font font, FontStyle fontStyle)
 {
     if (font != null)
     {
         this._font     = font;
         this.fontStyle = fontStyle;
         object fontKey = this.GetFontKey(font);
         this._fontInfos = (FontInfos)this._fontTable[fontKey];
         if (this._fontInfos == null)
         {
             this._fontInfos = this.CreateFontInfos(font);
             this._fontTable.Add(fontKey, this._fontInfos);
         }
         this._fontInfos.InitStyle(font.Style);
     }
     if (this.CurrentInfo != null)
     {
         this.InitDC(this.CurrentInfo.HFont);
     }
 }