From 6b687b91e788b4e91a6ed30640a2477b9596b954 Mon Sep 17 00:00:00 2001 From: sanine Date: Wed, 26 Jan 2022 02:32:06 -0600 Subject: refactor: move drawing functions into drawing.h/drawing.c --- experimental/tectonics/quadtree.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'experimental/tectonics/quadtree.c') diff --git a/experimental/tectonics/quadtree.c b/experimental/tectonics/quadtree.c index 820844d..45f11ac 100644 --- a/experimental/tectonics/quadtree.c +++ b/experimental/tectonics/quadtree.c @@ -167,30 +167,6 @@ int quadtree_get_closest(struct quadtree_node_t *node, } -void draw_quadtree(cairo_t *cr, struct quadtree_node_t *node) -{ - int width, height; - get_cairo_size(cr, &width, &height); - - cairo_set_source_rgba(cr, 0, 0, 1, 1); - struct point_t center = node->region.center; - double half_dim = node->region.half_dim; - - double x = (center.x - half_dim) * width; - double y = (center.y - half_dim) * height; - - cairo_rectangle(cr, x, y, 2*half_dim * width, 2*half_dim * height); - cairo_stroke(cr); - - if (node->nw != NULL) { - draw_quadtree(cr, node->nw); - draw_quadtree(cr, node->ne); - draw_quadtree(cr, node->sw); - draw_quadtree(cr, node->se); - } -} - - void quadtree_free(struct quadtree_node_t *node) { if (node->nw != NULL) { -- cgit v1.2.1