diff options
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; +} |