summaryrefslogtreecommitdiff
path: root/experimental/tectonics/quadtree.c
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-01-26 02:32:06 -0600
committersanine <sanine.not@pm.me>2022-01-26 02:32:06 -0600
commit6b687b91e788b4e91a6ed30640a2477b9596b954 (patch)
treebe0ebf99cd8ff3776f59a33b42ef22ab07c71a6c /experimental/tectonics/quadtree.c
parent672819693ddf1d203c304697b63f44059cff09b6 (diff)
refactor: move drawing functions into drawing.h/drawing.c
Diffstat (limited to 'experimental/tectonics/quadtree.c')
-rw-r--r--experimental/tectonics/quadtree.c24
1 files changed, 0 insertions, 24 deletions
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) {