ui/gtk/draw_cairo.c

changeset 114
909fe96e5659
parent 105
86d729874ff4
child 115
102fc0b8fe3e
--- a/ui/gtk/draw_cairo.c	Sun Jan 24 19:57:16 2016 +0100
+++ b/ui/gtk/draw_cairo.c	Sun Jan 24 22:20:47 2016 +0100
@@ -105,6 +105,14 @@
 }
 
 
+void ui_draw_line(UiGraphics *g, int x1, int y1, int x2, int y2) {
+    UiCairoGraphics *gr = (UiCairoGraphics*)g;
+    cairo_set_line_width(gr->cr, 1);
+    cairo_move_to(gr->cr, x1, y1);
+    cairo_line_to(gr->cr, x2, y2);
+    cairo_stroke(gr->cr);
+}
+
 void ui_draw_rect(UiGraphics *g, int x, int y, int w, int h, int fill) {
     UiCairoGraphics *gr = (UiCairoGraphics*)g;
     cairo_set_line_width(gr->cr, 1);

mercurial