From bfacf5a78ddf09baa32c8d6c23d2dfb89d59c15d Mon Sep 17 00:00:00 2001 From: rodri Date: Wed, 1 Jul 2020 21:44:44 +0000 Subject: add better brush color management. fix issues with procrfork. replace procexecl with execl. fclamp is now part of libgeometry so get rid of it. --- color.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 color.c (limited to 'color.c') diff --git a/color.c b/color.c new file mode 100644 index 0000000..ce69fe6 --- /dev/null +++ b/color.c @@ -0,0 +1,24 @@ +#include +#include +#include +#include +#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); +} -- cgit v1.2.3