示例#1
0
        static void TestTFT()
        {
            //TFT.Clear(TFT.Colors.Red);

            // 调试口输出字符串
            Debug.Print("Design by NewLife");

            // 输出所有可见ASCII字符
            for (int i = 32; i < 128; i++)
            {
                TFT.Print(((Char)i).ToString());
            }

            //TFT.Clear(TFT.Colors.Black);
            // 画线,左上角到右下角,红色
            TFT.DrawLine(0, 0, TFT.Width - 1, TFT.Height - 1, TFT.Colors.Red);
            // 修改背景色前景色后输出字符
            //TFT.BackColor = TFT.Colors.Green;
            TFT.ForeColor = TFT.Colors.Magenta;
            Print("Hello! NewLife Develop Team!");
            Print("X:" + TFT.X);
            Print("Y:" + TFT.Y);
            Print("BackLight:" + TFT.BackLight);
            Print("LCD:0x" + TFT.DeviceCode.ToString("X"));

            // 画矩形
            TFT.DrawRectangle(10, 70, 120, 160, TFT.Colors.Blue);

            // 画线,右上角到左下角,绿色
            TFT.DrawLine(TFT.Width - 1, 0, 0, TFT.Height - 1, TFT.Colors.Green);
            Print("Test Finished!");
        }
示例#2
0
 static void Print(String msg)
 {
     Debug.Print(msg);
     TFT.Print("\r\n" + msg);
 }