aboutsummaryrefslogtreecommitdiff
path: root/generic/Track.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/Track.c')
-rw-r--r--generic/Track.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/generic/Track.c b/generic/Track.c
index 0b25256..f10e461 100644
--- a/generic/Track.c
+++ b/generic/Track.c
@@ -719,15 +719,13 @@ ComputeCoordinates(ZnItem item,
/*printf("track pos %g %g --> %g %g\n", track->pos.x, track->pos.y, track->dev.x, track->dev.y);*/
if (track->symbol != ZnUnspecifiedImage) {
ZnSizeOfImage(track->symbol, &w_int, &h_int);
- w = w_int;
- h = h_int;
/*printf("taille symbole %d %d\n", w, h);*/
- w2 = (w+1.0)/2.0;
- h2 = (h+1.0)/2.0;
+ w2 = (w_int+1.0)/2.0;
+ h2 = (h_int+1.0)/2.0;
bbox.orig.x = track->dev.x - w2;
bbox.orig.y = track->dev.y - h2;
- bbox.corner.x = bbox.orig.x + w;
- bbox.corner.y = bbox.orig.y + h;
+ bbox.corner.x = track->dev.x + w2;
+ bbox.corner.y = track->dev.y + h2;
ZnAddBBoxToBBox(&item->item_bounding_box, &bbox);
}
@@ -747,8 +745,7 @@ ComputeCoordinates(ZnItem item,
wi->track_visible_history_size : 0);
ZnResetBBox(&bbox);
- w = track->history_width;
- w2 = (w+1.0)/2.0;
+ w2 = (track->history_width+1.0)/2.0;
num_acc_pos = ZnListSize(track->history);
hist = ZnListArray(track->history);
for (i = 0; i < num_acc_pos; i++) {
@@ -756,8 +753,8 @@ ComputeCoordinates(ZnItem item,
if ((i < visible_history_size) && (hist[i].visible)) {
bbox.orig.x = hist[i].dev.x - w2;
bbox.orig.y = hist[i].dev.y - w2;
- bbox.corner.x = bbox.orig.x + w;
- bbox.corner.y = bbox.orig.y + w;
+ bbox.corner.x = hist[i].dev.x + w2;
+ bbox.corner.y = hist[i].dev.y + w2;
ZnAddBBoxToBBox(&item->item_bounding_box, &bbox);
}
}