Esempio n. 1
0
        public static void Fill(CharacterAttribute attr, IViewport boxModel, VirtualConsole console)
        {
            var location = ViewPointToConsolePoint(new TvPoint(0, 0), boxModel.Position);

            for (var rows = 0; rows < boxModel.Rows; rows++)
            {
                console.DrawAt(new string(' ', boxModel.Columns), location + new TvPoint(0, rows), boxModel.ZIndex, attr);
            }
        }
Esempio n. 2
0
        public static void DrawStringAt(string text, TvPoint location, CharacterAttribute attr, IViewport boxModel, VirtualConsole console)
        {
            var consoleLocation = ViewPointToConsolePoint(location, boxModel.Position);
            var zindex          = boxModel.ZIndex;

            if (boxModel.Columns < text.Length)
            {
                text = text.Substring(0, boxModel.Columns);
            }
            console.DrawAt(text, consoleLocation, zindex, attr);
        }
Esempio n. 3
0
        public static void Clear(IViewport boxModel, VirtualConsole console)
        {
            var location = ViewPointToConsolePoint(new TvPoint(0, 0), boxModel.Position);

            console.DrawAt(new string(' ', boxModel.Columns), location, int.MinValue, new CharacterAttribute());
        }