示例#1
0
 public ScreenHelper()
 {
     //计算出屏幕缩放比例,640是你的UI原始设计图的高度
     flag = App.ScreenWidth / 640.0;
     px   = new PIXEL();
     m    = new MARGIN();
 }
示例#2
0
        public SizeHelper()
        {
                          //计算出屏幕缩放比例,640是你的UI原始设计图的高度
                flag = 1; //App.ScreenWidth / 720.0;

            px = new PIXEL();
            m  = new MARGIN();
        }
示例#3
0
 public static void FillA(int x1, int y1, int x2, int y2, PIXEL pixel, COLOUR colour)
 {
     Clip(x1, y1);
     Clip(x2, y2);
     for (int x = x1; x < x2; x++)
     {
         for (int y = y1; y < y2; y++)
         {
             DrawA(x, y, pixel, colour);
         }
     }
 }
示例#4
0
 public static void SetPixel(int x, int y, PIXEL pixel)
 {
     buf[y * ScreenWidth + x].Char.AsciiChar = (byte)pixel;
 }
示例#5
0
 public static void DrawA(int x, int y, PIXEL pixel, COLOUR colour)
 {
     buf[y * ScreenWidth + x].Char.AsciiChar = (byte)pixel;
     buf[y * ScreenWidth + x].Attributes     = (short)colour;
 }