aboutsummaryrefslogtreecommitdiff
path: root/alloc.c
diff options
context:
space:
mode:
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;
+}