public override ConsoleCharBuffer Render() { if (!_dirty && displayBuffer != null) { return(displayBuffer); } Font figfont = FontFactory.GetFont(FontName); FIGBuffer rendered = figfont.Render(Text); ConsoleCharBuffer buffer = new ConsoleCharBuffer(rendered.Width, rendered.Height); buffer.Clear(); for (int x = 0; x < buffer.Width; x++) { for (int y = 0; y < buffer.Height; y++) { char ch = rendered.data[x, y].Char; if (ch != TransparentChar) { buffer.data[x, y] = new ConsoleChar(this, ch, false, BackgroundColor, ForegroundColor); } } } Dirty = false; return(buffer); }
public FIGChar(int code, string name, FIGBuffer buffer) { Code = code; Name = name; Buffer = buffer; }