From 3000f7986489f01ecda0d20af68dc73c2f074fa9 Mon Sep 17 00:00:00 2001 From: rodri Date: Tue, 30 Jan 2024 15:12:36 +0000 Subject: adapted to the new libgraphics and its rendering requirements. --- alloc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'alloc.c') diff --git a/alloc.c b/alloc.c index 2589e89..eec8def 100644 --- a/alloc.c +++ b/alloc.c @@ -1,6 +1,7 @@ #include #include #include +#include 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; +} -- cgit v1.2.3