-
Notifications
You must be signed in to change notification settings - Fork 1
/
DrawGraph.c
91 lines (84 loc) · 1.92 KB
/
DrawGraph.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#include "headfile.h"
#include "MyFont.h"
void DrawPicture (int x,int y,int width,int height,unsigned char * pGraph)
{
DISPGRAPH dg;
dg.x = x;
dg.y = y;
dg.GraphData.width = width;
dg.GraphData.height = height;
dg.GraphData.pBitmap = pGraph;
dg.WriteModify = IMB_WRITEMODIFY_NORMAL;
dg.WriteKind = IMB_WRITEKIND_OVER;
Bdisp_WriteGraph_DDVRAM(&dg);
}
void DrawClearBox (int left,int top,int right,int bottom,int sel)
{
DISPBOX box;
box.left = left;box.top = top;box.right = right;box.bottom = bottom;
Bdisp_AreaClr_DDVRAM (&box);
if(sel)
{
Bdisp_DrawLineVRAM (box.left,box.top,box.right,box.top);
Bdisp_DrawLineVRAM (box.left,box.bottom,box.right,box.bottom);
Bdisp_DrawLineVRAM (box.left,box.top,box.left,box.bottom);
Bdisp_DrawLineVRAM (box.right,box.top,box.right,box.bottom);
}
}
void PrintIcon (int index,char* text,int sel)
{
index*=21;
if (sel)
{
PrintXY(index+1+3*(3-strlen(text)),57,(uchar*)text,0);
//PrintMini(index+1+2*(5-strlen(text)), 59, (uchar*)text,0);
Bdisp_DrawLineVRAM(index,55,index+19,55);
Bdisp_DrawLineVRAM(index,55,index,63);
}
else
{
PrintXY(index+3*(3-strlen(text)),56,(uchar*)text,0);
//PrintMini(index+2*(5-strlen(text)), 59, (uchar*)text, 0);
Bdisp_AreaReverseVRAM(index,55,index+19,63);
}
}
void About()
{
Bdisp_AllClr_VRAM();
//PopUpWin (6);
//PrintChStr("²âÁ¿ÉñÆ÷ÄÚ²â°æ ",22,6);
PrintXY (50,22,(uchar*)"V1.0",0);
PrintXY (30,34,(uchar*)"By Wukaibin",0);
PrintXY (28,46,(uchar*)"QQ:183177496",0);
WaitKey();
}
void Nodata()
{
PopUpWin (1);
PrintXY (16,24,(uchar*)"Sorry! No Data.",0);
WaitKey();
}
void SQX_ERR()
{
PopUpWin (1);
PrintXY (16,24,(uchar*)"SQX Data Error!",0);
WaitKey();
}
void HP_ERR()
{
PopUpWin (1);
PrintXY (16,24,(uchar*)"HP Data Error!",0);
WaitKey();
}
void PQX_ERR()
{
PopUpWin (1);
PrintXY (16,24,(uchar*)"PQX Data Error!",0);
WaitKey();
}
void ReadData_ERR()
{
PopUpWin (1);
PrintXY (16,24,(uchar*)"Read Data Error!",0);
WaitKey();
}