root / proj / libs / graph / include / rectangle.h @ 309
History | View | Annotate | Download (1015 Bytes)
1 |
#ifndef RECTANGLE_H_INCLUDED
|
---|---|
2 |
#define RECTANGLE_H_INCLUDED
|
3 |
|
4 |
struct rectangle;
|
5 |
typedef struct rectangle rectangle_t; |
6 |
|
7 |
rectangle_t* (rectangle_ctor)(int16_t x, int16_t y, uint16_t w, uint16_t h); |
8 |
void (rectangle_dtor)(rectangle_t *p);
|
9 |
|
10 |
void (rectangle_set_pos) (rectangle_t *p, int16_t x, int16_t y);
|
11 |
void (rectangle_set_size) (rectangle_t *p, uint16_t w, uint16_t h);
|
12 |
void (rectangle_set_fill_color) (rectangle_t *p, uint32_t color);
|
13 |
void (rectangle_set_fill_trans) (rectangle_t *p, uint8_t alpha);
|
14 |
void (rectangle_set_outline_color)(rectangle_t *p, uint32_t color);
|
15 |
void (rectangle_set_outline_width)(rectangle_t *p, int16_t width);
|
16 |
|
17 |
int16_t (rectangle_get_x)(const rectangle_t *p);
|
18 |
int16_t (rectangle_get_y)(const rectangle_t *p);
|
19 |
uint16_t (rectangle_get_w)(const rectangle_t *p);
|
20 |
uint16_t (rectangle_get_h)(const rectangle_t *p);
|
21 |
int (rectangle_collide_point)(const rectangle_t *p, int x, int y); |
22 |
|
23 |
void (rectangle_draw)(const rectangle_t *p); |
24 |
|
25 |
#endif //RECTANGLE_H_INCLUDED |