aboutsummaryrefslogtreecommitdiffstats
path: root/renderer.c
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2025-04-30 11:30:48 -0400
committerSam Anthony <sam@samanthony.xyz>2025-04-30 11:30:48 -0400
commit550dee49514fe3528c43541f062c1ae5590313ae (patch)
tree5378c2940fa8352d5e365ec5309a8de8635ed9b4 /renderer.c
parenteb38a10f13e0c778afe72171a6792e615d01087e (diff)
downloadvolute-550dee49514fe3528c43541f062c1ae5590313ae.zip
clear canvas
Diffstat (limited to 'renderer.c')
-rw-r--r--renderer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/renderer.c b/renderer.c
index 4e4444f..4d6b378 100644
--- a/renderer.c
+++ b/renderer.c
@@ -481,6 +481,16 @@ r_canvas_draw_circle(int id, int x, int y, int r, mu_Color color) {
return 0;
}
+void
+r_clear_canvas(int id) {
+ Canvas canvas;
+
+ expect(id >= 0 && id < canvas_list.idx);
+
+ canvas = canvas_list.items[id];
+ clear_surface(canvas.fg);
+}
+
/* Render a canvas to its underlying icon texture. Returns the id of the icon, or -1 on error. */
int
r_render_canvas(int id) {