blob: ce69fe6a7c834b18abec7ec95406015421075af1 (
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
|
#include <u.h>
#include <libc.h>
#include <draw.h>
#include <geometry.h>
#include "dat.h"
#include "fns.h"
Color*
newcolor(ulong col)
{
Color *c;
c = emalloc(sizeof(Color));
c->v = col;
c->i = eallocimage(display, Rect(0,0,1,1), screen->chan, 1, col);
return c;
}
void
rmcolor(Color *c)
{
freeimage(c->i);
free(c);
}
|