From 4cc5ea7a9ba98c65a576bcb726041fbe372ad2b2 Mon Sep 17 00:00:00 2001 From: erg <devnull@localhost> Date: Mon, 26 Apr 2010 18:00:56 +0000 Subject: [PATCH] For boxes, enforce x and y symmetry, so that horizontal and vertical edges are truly such. We should probably add some mechanism to handle such symmetries for other built-in shapes. --- lib/common/shapes.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/common/shapes.c b/lib/common/shapes.c index 5cda19ef4..a7203c2f3 100644 --- a/lib/common/shapes.c +++ b/lib/common/shapes.c @@ -974,6 +974,15 @@ static void poly_init(node_t * n) /* store result in array of points */ vertices[i] = P; + if (isBox) { /* enforce exact symmetry of box */ + vertices[1].x = -P.x; + vertices[1].y = P.y; + vertices[2].x = -P.x; + vertices[2].y = -P.y; + vertices[3].x = P.x; + vertices[3].y = -P.y; + break; + } } /* apply minimum dimensions */ -- 2.40.0