root / proj / libs / graph / include / rectangle.h @ 333
History | View | Annotate | Download (1.09 KB)
1 | 178 | up20180642 | #ifndef RECTANGLE_H_INCLUDED
|
---|---|---|---|
2 | #define RECTANGLE_H_INCLUDED
|
||
3 | |||
4 | 333 | up20180642 | /**
|
5 | * @defgroup rectangle_t rectangle_t
|
||
6 | * @ingroup graph
|
||
7 | * @brief Rectangle module.
|
||
8 | *
|
||
9 | * @{
|
||
10 | */
|
||
11 | |||
12 | 178 | up20180642 | typedef struct rectangle rectangle_t; |
13 | |||
14 | rectangle_t* (rectangle_ctor)(int16_t x, int16_t y, uint16_t w, uint16_t h); |
||
15 | void (rectangle_dtor)(rectangle_t *p);
|
||
16 | |||
17 | 179 | up20180642 | void (rectangle_set_pos) (rectangle_t *p, int16_t x, int16_t y);
|
18 | void (rectangle_set_size) (rectangle_t *p, uint16_t w, uint16_t h);
|
||
19 | void (rectangle_set_fill_color) (rectangle_t *p, uint32_t color);
|
||
20 | 286 | up20180642 | void (rectangle_set_fill_trans) (rectangle_t *p, uint8_t alpha);
|
21 | 179 | up20180642 | void (rectangle_set_outline_color)(rectangle_t *p, uint32_t color);
|
22 | void (rectangle_set_outline_width)(rectangle_t *p, int16_t width);
|
||
23 | |||
24 | int16_t (rectangle_get_x)(const rectangle_t *p);
|
||
25 | int16_t (rectangle_get_y)(const rectangle_t *p);
|
||
26 | uint16_t (rectangle_get_w)(const rectangle_t *p);
|
||
27 | uint16_t (rectangle_get_h)(const rectangle_t *p);
|
||
28 | 251 | up20180655 | int (rectangle_collide_point)(const rectangle_t *p, int x, int y); |
29 | 179 | up20180642 | |
30 | void (rectangle_draw)(const rectangle_t *p); |
||
31 | |||
32 | 333 | up20180642 | /**
|
33 | * @}
|
||
34 | */
|
||
35 | |||
36 | 178 | up20180642 | #endif //RECTANGLE_H_INCLUDED |