Esempio n. 1
0
        public static void drawcircle(int x0, int y0, int radius)
        {
            HashmapDumper.SendRawEncoded($"touch 0 0");
            int x   = radius;
            int y   = 0;
            int err = 0;

            while (x >= y)
            {
                setPixel(x0 + x, y0 + y, 7);
                setPixel(x0 + y, y0 + x, 7);
                setPixel(x0 - y, y0 + x, 7);
                setPixel(x0 - x, y0 + y, 7);
                setPixel(x0 - x, y0 - y, 7);
                setPixel(x0 - y, y0 - x, 7);
                setPixel(x0 + y, y0 - x, 7);
                setPixel(x0 + x, y0 - y, 7);

                if (err <= 0)
                {
                    y   += 1;
                    err += 2 * y + 1;
                }

                if (err > 0)
                {
                    x   -= 1;
                    err -= 2 * x + 1;
                }
            }
        }
Esempio n. 2
0
 static void setPixel(int x, int y, int depth)
 {
     HashmapDumper.SendRawEncoded($"touch {x} {y}", false, false);
     Thread.Sleep(15);
 }
Esempio n. 3
0
 public static void SendKeyCommand(bool connect, params HidKeyboardKey[] keys)
 {
     HashmapDumper.SendRawEncoded($"key{string.Concat(keys.Select(z => $" {(int)z}"))}", false, connect);
 }