From 9595028319ff44ced403d41c727a34c25dac790e Mon Sep 17 00:00:00 2001 From: Raphael Boucherie <raphael.boucherie@inria.fr> Date: Thu, 13 Apr 2017 17:46:31 +0200 Subject: [PATCH] re-added condition for ts rectangle --- testings/testing_treedraw.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/testings/testing_treedraw.c b/testings/testing_treedraw.c index 680ece4..8ccebd0 100644 --- a/testings/testing_treedraw.c +++ b/testings/testing_treedraw.c @@ -49,12 +49,22 @@ main(int argc, char ** argv) libhqr_treewalk(&qrtree, k, tiles, tree, SIZE); /* Drawing the rectangles */ for (i = k + 1; i < maxMN; i++){ - absciss1 = ((SIZE * 3) /4) + SIZE * tiles[i]; - ordinate1 = ((SIZE * 3) /4) + SIZE * i; - libhqr_drawTS(absciss1, ordinate1, WIDTH, HEIGHT, k, tree); - j = qrtree.currpiv(&qrtree, k, i); - ordinate1 = ((SIZE * 3) /4) + SIZE * j; - libhqr_drawTT(absciss1, ordinate1, WIDTH, HEIGHT, k, tree); + if(qrtree.gettype(&qrtree, k, i) == 0){ + absciss1 = ((SIZE * 3) /4) + SIZE * tiles[i]; + ordinate1 = ((SIZE * 3) /4) + SIZE * i; + libhqr_drawTS(absciss1, ordinate1, WIDTH, HEIGHT, k, tree); + j = qrtree.currpiv(&qrtree, k, i); + ordinate1 = ((SIZE * 3) /4) + SIZE * j; + libhqr_drawTT(absciss1, ordinate1, WIDTH, HEIGHT, k, tree); + } + else { + absciss1 = ((SIZE * 3) /4) + SIZE * tiles[i]; + ordinate1 = ((SIZE * 3) /4) + SIZE * i; + libhqr_drawTS(absciss1, ordinate1, WIDTH, HEIGHT, k, tree); + j = qrtree.currpiv(&qrtree, k, i); + ordinate1 = ((SIZE * 3) /4) + SIZE * j; + libhqr_drawTT(absciss1, ordinate1, WIDTH, HEIGHT, k, tree); + } } } libhqr_writeend(tree); -- GitLab