blob: aa273e8c26b24136b4f41d95c4349832c5da0981 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* See LICENSE file for copyright and license details. */
#include <stdlib.h>
#include "dimension.h"
CherryDimension *
cherry_dimension_new(void)
{
CherryDimension *dim = malloc(sizeof(*dim));
if (dim == NULL) return NULL;
cherry_dimension_set_width(dim, 0);
cherry_dimension_set_height(dim, 0);
return dim;
}
void
cherry_dimension_set_width(CherryDimension *d, int width)
{
d->width = width;
}
void
cherry_dimension_set_height(CherryDimension *d, int height)
{
d->height = height;
}
|