From 895a58b1b57a0ae8028576404a90f12e0133cf5f Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 27 Apr 2021 23:32:05 +0200 Subject: Chess (-> and libgui) improvements --- libs/libgui/gfx.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libs/libgui/gfx.c') diff --git a/libs/libgui/gfx.c b/libs/libgui/gfx.c index bddd5ed..15c44b1 100644 --- a/libs/libgui/gfx.c +++ b/libs/libgui/gfx.c @@ -266,6 +266,11 @@ void gfx_draw_rectangle(struct context *ctx, vec2 pos1, vec2 pos2, u32 c) draw_rectangle(ctx, pos1, pos2, c); } +void gfx_clear(struct context *ctx) +{ + memset(ctx->fb, 0, ctx->bytes); +} + void gfx_fill(struct context *ctx, u32 c) { draw_rectangle(ctx, vec2(0, 0), vec2(ctx->size.x, ctx->size.y), c); -- cgit v1.2.3