public TerminalEmulator(int cols, int lines) { _inv_lock = new object(); _font = new FontGroup(new Font[] { new UnicodeFont(new System.Drawing.Font("Consolas", 16.0F), new PointF()) }, new SizeF(10.0F, 20.0F)); _chars = new TerminalChars(this, cols, lines); SetStyle(ControlStyles.ResizeRedraw, true); DoubleBuffered = true; InitializeComponent(); }
internal override void Draw(System.Drawing.Graphics graphics, FontGroup font, System.Drawing.RectangleF rec) { if (!br.ContainsKey(bgcolor)) br[bgcolor] = new SolidBrush(bgcolor); graphics.FillRectangle(br[bgcolor], rec); }
internal override void Draw(System.Drawing.Graphics graphics, FontGroup font, System.Drawing.RectangleF rec) { base.Draw(graphics, font, rec); if (!br.ContainsKey(fgcolor)) br[fgcolor] = new SolidBrush(fgcolor); foreach (Font f in font.Fonts) { if (f.Accept(value)) { rec.X += f.Offset.X; rec.Y += f.Offset.Y; graphics.DrawString(value.ToString(), f.GetFont, br[fgcolor], rec, format); break; } } }
internal abstract void Draw(System.Drawing.Graphics graphics, FontGroup font, System.Drawing.RectangleF rec);
internal override void Draw(System.Drawing.Graphics graphics, FontGroup _font, System.Drawing.RectangleF rec) { }