Example #1
0
 /// <summary>
 /// Initializes a new instance of the FontRenderer class.
 /// </summary>
 public FontRenderer(Layer layer, Font font, int charWidth, int charHeight)
 {
     this.layer = layer;
     this.font = font;
     this.charWidth = charWidth;
     this.charHeight = charHeight;
 }
Example #2
0
File: Kernel.cs Project: ke2083/KOS
        protected override void Run()
        {
            mouseLayer.Clear();

            var f = new Font();
            var fr = new FontRenderer(mouseLayer, f, 20, 35);

            fr.Write("ABC", 0, 0, Colour.Grey);
            fr.Write("ABC", 0, 12, Colour.LightBlue);
            fr.Write("ABC", 0, 24, Colour.LightGreen);

            //mouseLayer.DrawLine(0, 0, 300, 300, Colour.Magenta);
            canvas.Redraw();
            //var input = Console.ReadLine();
            //var components = input.Split(' ');
            //var x = (uint)int.Parse(components[0]);
            //var y = (uint)int.Parse(components[1]);
            //var x1 = int.Parse(components[2]);
            //var y1 = int.Parse(components[3]);
            //var c = (uint)int.Parse(components[4]);
            //canvas.DrawBox(x, y, x1, y1, c);
        }