From 6b6205e3bcf3b8e8a20c4e80ae2478b8f3add979 Mon Sep 17 00:00:00 2001
From: Raphael Boucherie <raphael.boucherie@inria.fr>
Date: Wed, 12 Apr 2017 15:36:25 +0200
Subject: [PATCH] Can draw horizontal line

---
 testings/testing_treedraw.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/testings/testing_treedraw.c b/testings/testing_treedraw.c
index a9e0c33..9e802c2 100644
--- a/testings/testing_treedraw.c
+++ b/testings/testing_treedraw.c
@@ -29,7 +29,7 @@ main(int argc, char ** argv)
 {
     libhqr_tree_t qrtree;
     libhqr_tiledesc_t matrix;
-    int maxMN;
+    int maxMN, x1, y1, x2, y2;
     int *tiles;
     matrix.nodes = 1;
     matrix.p     = 1;
@@ -44,6 +44,12 @@ main(int argc, char ** argv)
     FILE *tree = fopen("tree.svg","w+");
     libhqr_writeheader(tree);
     libhqr_treewalk(&qrtree, 0, tiles);
+    for ( int i = 0; i < maxMN; i++){
+        x1 = 50;
+        y1 = y2 = 50 + 50 * i;
+        x2 = 50 + 50*tiles[i];
+        libhqr_drawline(x1, y1, x2, y2, tree);
+    }
     libhqr_writeend(tree);
     free(tree);
     return 1;
-- 
GitLab