aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
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;