Пример #1
0
        void draw_course(GLCD lcd)
        {
            //lcd.DrawVParallel(7, 90, 2, 18, );

            lcd.DrawVLine(79, 81, 2);
            int num = (360 - (int)course) % 45;
            num = (num >= 35 || num <= 10) ? 3 : 2;
            lcd.DrawVParallel(24 + (370 - (int)course) % 45, 85, 1, 45, num);
            lcd.DrawVParallel(24 + (360 - (int)course) % 5, 87, 2, 5, 23);

            //lcd.DrawLine(0, 15, 158, 15);
            string[] name = { "NW", "N", "NE", "E", "SE", "S", "SW", "W" };
            for (int i = 0; i < num; i++)
            {
                lcd.DrawString(24 + (370 - (int)course) % 45 + i * 45 - 3, 93, name[(((int)course + 35) / 45 + i) % 8]);
            }
            //lcd.DrawString(78, 90, "N");
            //lcd.DrawString(27, 90, "NW");
            //lcd.DrawString(120, 90, "NE");
        }
Пример #2
0
        void draw_course(GLCD lcd)
        {
            //lcd.DrawVParallel(7, 90, 2, 18, );


            lcd.DrawVLine(79, 81, 2);
            int num = (360 - (int)course) % 45;

            num = (num >= 35 || num <= 10) ? 3 : 2;
            lcd.DrawVParallel(24 + (370 - (int)course) % 45, 85, 1, 45, num);
            lcd.DrawVParallel(24 + (360 - (int)course) % 5, 87, 2, 5, 23);

            //lcd.DrawLine(0, 15, 158, 15);
            string[] name = { "NW", "N", "NE", "E", "SE", "S", "SW", "W" };
            for (int i = 0; i < num; i++)
            {
                lcd.DrawString(24 + (370 - (int)course) % 45 + i * 45 - 3, 93, name[(((int)course + 35) / 45 + i) % 8]);
            }
            //lcd.DrawString(78, 90, "N");
            //lcd.DrawString(27, 90, "NW");
            //lcd.DrawString(120, 90, "NE");
        }