aboutsummaryrefslogtreecommitdiff
path: root/generic/Curve.c
diff options
context:
space:
mode:
authorlecoanet2005-04-14 09:13:43 +0000
committerlecoanet2005-04-14 09:13:43 +0000
commitdde87984292bf32907a34052c2283497252eeb5f (patch)
tree5b6ca59cd62f25eae20605d715d2df95c5a45559 /generic/Curve.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/Curve.c')
-rw-r--r--generic/Curve.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/Curve.c b/generic/Curve.c
index 261f242..aa66b70 100644
--- a/generic/Curve.c
+++ b/generic/Curve.c
@@ -806,16 +806,6 @@ ComputeCoordinates(ZnItem item,
}
/*
- * Add the line width in all directions.
- * This overestimates the space needed to draw the polyline
- * but is simple.
- */
- item->item_bounding_box.orig.x -= lw;
- item->item_bounding_box.orig.y -= lw;
- item->item_bounding_box.corner.x += lw;
- item->item_bounding_box.corner.y += lw;
-
- /*
* Take care of miters, markers and arrows.
*/
c2 = cv->outlines.contours;
@@ -868,6 +858,16 @@ ComputeCoordinates(ZnItem item,
}
/*
+ * Add the line width in all directions.
+ * This overestimates the space needed to draw the polyline
+ * but is simple.
+ */
+ item->item_bounding_box.orig.x -= lw;
+ item->item_bounding_box.orig.y -= lw;
+ item->item_bounding_box.corner.x += lw;
+ item->item_bounding_box.corner.y += lw;
+
+ /*
* Expand again the bounding box by one pixel in all
* directions to take care of rounding errors.
*/