Project

General

Profile

Statistics
| Revision:

root / proj / include / rectangle.h @ 266

History | View | Annotate | Download (947 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
void (rectangle_set_outline_color)(rectangle_t *p, uint32_t color);
14
void (rectangle_set_outline_width)(rectangle_t *p,  int16_t width);
15
16
int16_t  (rectangle_get_x)(const rectangle_t *p);
17
int16_t  (rectangle_get_y)(const rectangle_t *p);
18
uint16_t (rectangle_get_w)(const rectangle_t *p);
19
uint16_t (rectangle_get_h)(const rectangle_t *p);
20 251 up20180655
int      (rectangle_collide_point)(const rectangle_t *p, int x, int y);
21 179 up20180642
22
void (rectangle_draw)(const rectangle_t *p);
23
24 178 up20180642
#endif //RECTANGLE_H_INCLUDED