aboutsummaryrefslogtreecommitdiff
path: root/libs/libgui/gfx.c
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libgui/gfx.c')
-rw-r--r--libs/libgui/gfx.c5
1 files changed, 5 insertions, 0 deletions
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);