diff options
author | rodri <rgl@antares-labs.eu> | 2024-01-30 15:12:36 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-01-30 15:12:36 +0000 |
commit | 3000f7986489f01ecda0d20af68dc73c2f074fa9 (patch) | |
tree | 12060c9112b2f9fda2ca16e5b8ebca67193d15ba /alloc.c | |
parent | 5f823efa33ea598dabc3cb584363aa967bdf7b08 (diff) | |
download | 3dee-3000f7986489f01ecda0d20af68dc73c2f074fa9.tar.gz 3dee-3000f7986489f01ecda0d20af68dc73c2f074fa9.tar.bz2 3dee-3000f7986489f01ecda0d20af68dc73c2f074fa9.zip |
adapted to the new libgraphics and its rendering requirements.
Diffstat (limited to 'alloc.c')
-rw-r--r-- | alloc.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1,6 +1,7 @@ #include <u.h> #include <libc.h> #include <draw.h> +#include <memdraw.h> void* emalloc(ulong n) @@ -42,3 +43,15 @@ eallocimage(Display *d, Rectangle r, ulong chan, int repl, ulong col) sysfatal("allocimage: %r"); return i; } + +Memimage * +eallocmemimage(Rectangle r, ulong chan) +{ + Memimage *i; + + i = allocmemimage(r, chan); + if(i == nil) + sysfatal("allocmemimage: %r"); + memfillcolor(i, DTransparent); + return i; +} |