aboutsummaryrefslogtreecommitdiff
path: root/generic/Geo.c
diff options
context:
space:
mode:
authorlecoanet2005-04-14 09:13:43 +0000
committerlecoanet2005-04-14 09:13:43 +0000
commitdde87984292bf32907a34052c2283497252eeb5f (patch)
tree5b6ca59cd62f25eae20605d715d2df95c5a45559 /generic/Geo.c
parent46ea8bc12e435b7ca6593bc43498ef6aae3e261a (diff)
downloadtkzinc-dde87984292bf32907a34052c2283497252eeb5f.zip
tkzinc-dde87984292bf32907a34052c2283497252eeb5f.tar.gz
tkzinc-dde87984292bf32907a34052c2283497252eeb5f.tar.bz2
tkzinc-dde87984292bf32907a34052c2283497252eeb5f.tar.xz
Fix a cumulative over-estimate of Curves bboxes (D.etienne)
Diffstat (limited to 'generic/Geo.c')
-rw-r--r--generic/Geo.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/generic/Geo.c b/generic/Geo.c
index 52ac268..d93c5e9 100644
--- a/generic/Geo.c
+++ b/generic/Geo.c
@@ -439,8 +439,14 @@ ZnAddPointsToBBox(ZnBBox *bbox,
}
bbox->orig.x = x1;
bbox->orig.y = y1;
- bbox->corner.x = x2 + 1;
- bbox->corner.y = y2 + 1;
+ if (x1 == x2) {
+ x2++;
+ }
+ if (y1 == y2) {
+ y2++;
+ }
+ bbox->corner.x = x2;
+ bbox->corner.y = y2;
}