/**
         * BaconDisplayDriver
         * ==============================
         * Copyright (c) 2015 Thomas Klose <*****@*****.**>
         * Source:
         *
         * Summary
         * ------------------------------
         *
         *
         * Abstract
         * ------------------------------
         *
         *
         * Example
         * ------------------------------
         *
         */



        void Main(string args)
        {
            Font myFont = Font.createFromString(samplefontdata);

            Dotmatrix bc = new Dotmatrix(85, 95, Dotmatrix.COLOR_DARK_GRAY);

            bc
            .color(Dotmatrix.COLOR_GREEN)
            .moveTo(3, 3)
            .text("Hello World!", myFont)
            .moveTo(1, 1)
            .rectangle(73, 9)
            .moveTo(1, 11)
            .lineTo(80, 11)
            .moveTo(4, 15)
            .color(Dotmatrix.COLOR_RED)
            .rectangle(40, 90)
            .moveTo(7, 18)
            .color(Dotmatrix.COLOR_WHITE)
            .rectangle(32, 79)
            .moveTo(2, 20)
            .color(Dotmatrix.COLOR_BLUE)
            .text("Dotmatrix LCD - Test", myFont)
            ;
            StringBuilder sb = bc.getImage();



            IMyTerminalBlock lcd = GridTerminalSystem.GetBlockWithName("LCD_GFX");

            if (lcd is IMyTextPanel)
            {
                (lcd as IMyTextPanel).WritePublicText(sb.ToString());
            }
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Font myFont = Font.createFromString(Program.samplefontdata);

            Dotmatrix bc = new Dotmatrix(100, 20, Dotmatrix.COLOR_DARK_GRAY);

            bc
            .color(Dotmatrix.COLOR_GREEN)
            .moveTo(3, 3)
            .text("Hello World!", myFont)
            .moveTo(1, 1)
            .rectangle(73, 9)
            ;

            StringBuilder sb = bc.getImage();

            System.Console.Write(sb.ToString());
            System.Console.WriteLine("press any key to exit");
            System.Console.ReadKey();
        }