aboutsummaryrefslogtreecommitdiff
path: root/alloc.c
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-01-30 15:12:36 +0000
committerrodri <rgl@antares-labs.eu>2024-01-30 15:12:36 +0000
commit3000f7986489f01ecda0d20af68dc73c2f074fa9 (patch)
tree12060c9112b2f9fda2ca16e5b8ebca67193d15ba /alloc.c
parent5f823efa33ea598dabc3cb584363aa967bdf7b08 (diff)
download3dee-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.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/alloc.c b/alloc.c
index 2589e89..eec8def 100644
--- a/alloc.c
+++ b/alloc.c
@@ -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;
+}