aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2024-11-22 01:44:04 +0100
committerFederico Angelilli <code@fedang.net>2024-11-22 01:44:04 +0100
commit713084a48649a7aa0c40ea6d6163f0def3dcd82c (patch)
treef26a79894dc0490c1a662c5eb634ad28397f8446 /src/util.c
parentb4d57d18b858824d0f5bde061d79c8f578630072 (diff)
Add slider knob
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index b06fbae..580c360 100644
--- a/src/util.c
+++ b/src/util.c
@@ -214,6 +214,15 @@ bool iszero(const void *ptr, size_t size)
return true;
}
+void render_triangle(cairo_t *cr, int x, int y, int w, int h)
+{
+ cairo_new_sub_path(cr);
+ cairo_line_to(cr, x, y);
+ cairo_line_to(cr, x, y + h);
+ cairo_line_to(cr, x + w, y + h / 2);
+ cairo_close_path(cr);
+}
+
void render_capsule_fast(cairo_t *cr, int x, int y, int w, int r1, int r2)
{
const double degree = M_PI / 180.0;