diff options
author | rodri <rgl@antares-labs.eu> | 2020-07-01 21:44:44 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2020-07-01 21:44:44 +0000 |
commit | bfacf5a78ddf09baa32c8d6c23d2dfb89d59c15d (patch) | |
tree | a0e3be0418d8859b4097043105907095174f440d /color.c | |
parent | 26c7bae49165a78f3e58e0dd45244c8942a1fe22 (diff) | |
download | puppeteer-master.tar.gz puppeteer-master.tar.bz2 puppeteer-master.zip |
add better brush color management. fix issues with procrfork. replace procexecl with execl.HEADmaster
fclamp is now part of libgeometry so get rid of it.
Diffstat (limited to 'color.c')
-rw-r--r-- | color.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -0,0 +1,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); +} |