Project

General

Profile

Statistics
| Revision:

root / proj / src / rectangle.c @ 178

History | View | Annotate | Download (437 Bytes)

1 178 up20180642
#include <lcom/lcf.h>
2
3
#include "rectangle.h"
4
5
struct rectangle{
6
    int16_t x, y;
7
    uint16_t w, h;
8
    uint32_t fill_color;
9
    uint32_t outline_color;
10
    uint16_t outline_width;
11
};
12
13
rectangle_t* (rectangle_ctor)(int16_t x, int16_t y, uint16_t w, uint16_t h){
14
    rectangle_t *ret = (rectangle_t*)malloc(sizeof(rectangle_t));
15
16
    return ret;
17
}
18
void         (rectangle_dtor)(rectangle_t *p){
19
    if(p == NULL) return;
20
    free(p);
21
}