From d320dbbf2b4ada83d4d8c1cf755e6b09bbd663d9 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 9 Aug 2016 11:21:52 -0300 Subject: [PATCH] eeshow/diff.c (diff_to_canvas): fix offset calculation --- eeshow/diff.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eeshow/diff.c b/eeshow/diff.c index 2eee314..dcd6187 100644 --- a/eeshow/diff.c +++ b/eeshow/diff.c @@ -343,12 +343,12 @@ void diff_to_canvas(cairo_t *cr, int cx, int cy, float scale, * be eager to mark with big yellow boxes. */ img_old = cro_img(old, - -scale * cx + sw / 2.0 - (xmin - old_xmin) * scale, - -scale * cy + sh / 2.0 - (ymin - old_ymin) * scale, + -scale * cx + sw / 2.0 - (2 * xmin - old_xmin) * scale, + -scale * cy + sh / 2.0 - (2 * ymin - old_ymin) * scale, sw, sh, scale, &old_cr, &stride); img_new = cro_img(new, - -scale * cx + sw / 2.0 - (xmin - new_xmin) * scale, - -scale * cy + sh / 2.0 - (ymin - new_ymin) * scale, + -scale * cx + sw / 2.0 - (2 * xmin - new_xmin) * scale, + -scale * cy + sh / 2.0 - (2 * ymin - new_ymin) * scale, sw, sh, scale, NULL, NULL); struct diff diff = {