Rev 5229 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5229 | Rev 5238 | ||
---|---|---|---|
1 | #ifndef RECT_H |
1 | #ifndef RECT_H |
2 | #define RECT_H |
2 | #define RECT_H |
3 | 3 | ||
4 | #include "defines.h" |
4 | #include "defines.h" |
5 | 5 | ||
6 | typedef struct { |
6 | typedef struct { |
7 | short x; |
7 | short x; |
8 | short y; |
8 | short y; |
9 | short width; |
9 | short width; |
10 | short height; |
10 | short height; |
11 | } rect; |
11 | } rect; |
12 | 12 | ||
13 | typedef struct { |
13 | typedef struct { |
14 | short x; |
14 | short x; |
15 | short y; |
15 | short y; |
16 | } point; |
16 | } point; |
17 | 17 | ||
18 | // Draw rect filled with color |
18 | // Draw rect filled with color |
19 | void rect_draw(rect* r, __u32 color); |
19 | void rect_draw(rect* r, __u32 color); |
20 | 20 | ||
21 | // Make transformation step |
21 | // Make transformation step |
22 | // Rect 'from' will be changed |
22 | // Rect 'from' will be changed |
23 | // Return 'true' if transformation ends ('from' == 'to') |
23 | // Return 'true' if transformation ends ('from' == 'to') |
24 | __u8 rect_transform(rect* from, rect* to, __u16 step); |
24 | __u8 rect_transform(rect* from, rect* to, __u16 step); |
25 | 25 | ||
26 | // Draw text at the rect center |
26 | // Draw text at the rect center |
27 | void rect_draw_text(rect* r, char* txt, __u32 len, __u32 color); |
27 | void rect_draw_text(rect* r, char* txt, __u32 len, __u32 color, __u32 frame_color); |
28 | 28 | ||
29 | // Draw value as text at the rect center |
29 | // Draw value as text at the rect center |
30 | void rect_draw_value(rect* r, __u32 v, __u32 color); |
30 | void rect_draw_value(rect* r, __u32 v, __u32 color, __u32 frame_color); |
31 | 31 | ||
32 | #endif // RECT_H |
32 | #endif // RECT_H |