Esempio n. 1
0
        private static long TestText(Ili9341SixteenBit tft)
        {
            var start = DateTime.UtcNow.Ticks;

            tft.FillScreen((ushort)Colors565.Black);
            tft.SetCursor(0, 0);
            tft.TextColor = (ushort)Colors565.White;
            tft.WriteLine("Hello World!");
            tft.TextColor = (ushort)Colors565.Magenta;
            tft.WriteLine(1234.56);
            tft.TextColor = (ushort)Colors565.Red;
            tft.WriteLine(0xDEADBEEF);
            tft.WriteLine();
            tft.TextColor = (ushort)Colors565.Green;
            tft.WriteLine("A wizard's staff has a knob on the end");
            tft.WriteLine("And runes run up the shaft");
            tft.WriteLine("It's long and proud and stiff and loud");
            tft.WriteLine("It's the pride of wizardcraft.");

            var finish = DateTime.UtcNow.Ticks;

            return(finish - start);
        }
Esempio n. 2
0
        private static long TestColor(Ili9341SixteenBit tft)
        {
            var start = DateTime.UtcNow.Ticks;

            tft.FillScreen((ushort)Colors565.Black);
            tft.SetCursor(0, 0);
            tft.TextColor = (ushort)Colors565.Navy;
            tft.WriteLine("Navy");
            tft.TextColor = (ushort)Colors565.Blue;
            tft.WriteLine("Blue");
            tft.TextColor = (ushort)Colors565.DarkGreen;
            tft.WriteLine("Dark Green");
            tft.TextColor = (ushort)Colors565.DarkCyan;
            tft.WriteLine("Dark Cyan");
            tft.TextColor = (ushort)Colors565.Green;
            tft.WriteLine("Green");
            tft.TextColor = (ushort)Colors565.Cyan;
            tft.WriteLine("Cyan");
            tft.TextColor = (ushort)Colors565.Maroon;
            tft.WriteLine("Maroon");
            tft.TextColor = (ushort)Colors565.Purple;
            tft.WriteLine("Purple");
            tft.TextColor = (ushort)Colors565.Olive;
            tft.WriteLine("Olive");
            tft.TextColor = (ushort)Colors565.DarkGrey;
            tft.WriteLine("Dark Grey");
            tft.TextColor = (ushort)Colors565.GreenYellow;
            tft.WriteLine("GreenYellow");
            tft.TextColor = (ushort)Colors565.LightGrey;
            tft.WriteLine("Light Grey");
            tft.TextColor = (ushort)Colors565.Red;
            tft.WriteLine("Red");
            tft.TextColor = (ushort)Colors565.Magenta;
            tft.WriteLine("Magenta");
            tft.TextColor = (ushort)Colors565.Pink;
            tft.WriteLine("Pink");
            tft.TextColor = (ushort)Colors565.Orange;
            tft.WriteLine("Orange");
            tft.TextColor = (ushort)Colors565.Yellow;
            tft.WriteLine("Yellow");
            tft.TextColor = (ushort)Colors565.White;
            tft.WriteLine("White");

            var finish = DateTime.UtcNow.Ticks;

            return(finish - start);
        }