Rev 3067 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3067 | Rev 3076 | ||
---|---|---|---|
1 | void DrawRectangle(dword x,y,width,height,color1) |
1 | void DrawRectangle(dword x,y,width,height,color1) |
2 | { |
2 | { |
3 | DrawBar(x,y,width,1,color1); |
3 | DrawBar(x,y,width,1,color1); |
4 | DrawBar(x,y+height,width,1,color1); |
4 | DrawBar(x,y+height,width,1,color1); |
5 | DrawBar(x,y,1,height,color1); |
5 | DrawBar(x,y,1,height,color1); |
6 | DrawBar(x+width,y,1,height+1,color1); |
6 | DrawBar(x+width,y,1,height+1,color1); |
7 | } |
7 | } |
8 | 8 | ||
9 | void DrawRectangle3D(dword x,y,width,height,color1,color2) |
9 | void DrawRectangle3D(dword x,y,width,height,color1,color2) |
10 | { |
10 | { |
11 | DrawBar(x,y,width+1,1,color1); |
11 | DrawBar(x,y,width+1,1,color1); |
12 | DrawBar(x,y+1,1,height-1,color1); |
12 | DrawBar(x,y+1,1,height-1,color1); |
13 | DrawBar(x+width,y+1,1,height,color2); |
13 | DrawBar(x+width,y+1,1,height,color2); |
14 | DrawBar(x,y+height,width,1,color2); |
14 | DrawBar(x,y+height,width,1,color2); |
15 | } |
15 | } |
16 | 16 | ||
17 | void DrawCaptButton(dword x,y,width,height,id,color,text,text_len) |
17 | void DrawCaptButton(dword x,y,width,height,id,color_b, color_t,text,text_len) |
18 | { |
18 | { |
19 | DefineButton(x,y,width,height,id+BT_HIDE,0xEFEBEF); |
19 | DefineButton(x,y,width,height,id,color_b); |
20 | WriteText(-text_len*6+width/2+x+1,height/2-3+y,0x80,0,text,0); |
20 | WriteText(-text_len*6+width/2+x+1,height/2-3+y,0x80,color_t,text,0); |
21 | } |
21 | } |
22 | 22 | ||
23 | void DrawCircle(int x, y, r) |
23 | void DrawCircle(int x, y, r) |
24 | { |
24 | { |
25 | int i; |
25 | int i; |
26 | float px=0, py=r, ii = r * 3.1415926 * 2; |
26 | float px=0, py=r, ii = r * 3.1415926 * 2; |
27 | FOR (i = 0; i < ii; i++) |
27 | FOR (i = 0; i < ii; i++) |
28 | { |
28 | { |
29 | PutPixel(px + x, y - py, 0); |
29 | PutPixel(px + x, y - py, 0); |
30 | px = py / r + px; |
30 | px = py / r + px; |
31 | py = -px / r + py; |
31 | py = -px / r + py; |
32 | } |
32 | } |
33 | }> |
33 | }> |