Project

General

Profile

Statistics
| Revision:

root / proj / libs / graph / include / rectangle.h @ 322

History | View | Annotate | Download (1015 Bytes)

1 178 up20180642
#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 179 up20180642
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 286 up20180642
void (rectangle_set_fill_trans)   (rectangle_t *p, uint8_t  alpha);
14 179 up20180642
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 251 up20180655
int      (rectangle_collide_point)(const rectangle_t *p, int x, int y);
22 179 up20180642
23
void (rectangle_draw)(const rectangle_t *p);
24
25 178 up20180642
#endif //RECTANGLE_H_INCLUDED