aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2025-05-02 12:04:19 -0400
committerSam Anthony <sam@samanthony.xyz>2025-05-02 12:04:19 -0400
commit5df9fecb029c740e151235ebbfb4835f21bd8313 (patch)
tree73e619f4cc38801ce4eb5a5cdf2be3a296bed7d9
parente9613ccbdf82deb0f8275e63ad6b5ca23077095c (diff)
downloadvolute-5df9fecb029c740e151235ebbfb4835f21bd8313.zip
set canvas dirty when circle drawn
-rw-r--r--widget.c5
-rw-r--r--widget.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/widget.c b/widget.c
index 5c6cb4b..7380793 100644
--- a/widget.c
+++ b/widget.c
@@ -387,6 +387,7 @@ render_canvas(w_Canvas *canvas) {
}
void
-w_canvas_draw_circle(w_Canvas canvas, int x, int y, int r, mu_Color color) {
- r_canvas_draw_circle(canvas.id, x, y, r, color);
+w_canvas_draw_circle(w_Canvas *canvas, int x, int y, int r, mu_Color color) {
+ r_canvas_draw_circle(canvas->id, x, y, r, color);
+ canvas->dirty = 1;
}
diff --git a/widget.h b/widget.h
index 87ef504..d722541 100644
--- a/widget.h
+++ b/widget.h
@@ -85,4 +85,4 @@ typedef struct {
int w_init_canvas(w_Canvas *c, const char *bg_img_path);
void w_free_canvas(w_Canvas *c);
void w_canvas(mu_Context *ctx, w_Canvas *canvas);
-void w_canvas_draw_circle(w_Canvas canvas, int x, int y, int r, mu_Color color);
+void w_canvas_draw_circle(w_Canvas *canvas, int x, int y, int r, mu_Color color);