public ScreenHelper() { //计算出屏幕缩放比例,640是你的UI原始设计图的高度 flag = App.ScreenWidth / 640.0; px = new PIXEL(); m = new MARGIN(); }
public SizeHelper() { //计算出屏幕缩放比例,640是你的UI原始设计图的高度 flag = 1; //App.ScreenWidth / 720.0; px = new PIXEL(); m = new MARGIN(); }
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); } } }
public static void SetPixel(int x, int y, PIXEL pixel) { buf[y * ScreenWidth + x].Char.AsciiChar = (byte)pixel; }
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; }