From 9538b68a7cccd97a1c7aa3a933a4a100ae55ec99 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Tue, 12 Aug 2008 05:10:15 -0300 Subject: [PATCH] Return the center of the image instead of the top-left corner --- movie.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/movie.c b/movie.c index f279449..f5ef008 100644 --- a/movie.c +++ b/movie.c @@ -70,7 +70,7 @@ GetNextPoint (void) static int x, y; int next; next = (cur + 1) % psize; - if (IS_CENTER (points[next].x, points[next].y, rect.x, rect.y) || cur == -1) + if ((points[next].x == rect.x && points[next].y == rect.y) || cur == -1) { cur = next; next = (cur + 1) % psize; @@ -92,8 +92,8 @@ GetNextPoint (void) x = x1; y = y1; } - rect.x = (swap ? y : x) - WIDTH/2; - rect.y = (swap ? x : y) - HEIGHT/2; + rect.x = (swap ? y : x); + rect.y = (swap ? x : y); (x2 < x1) ? x-- : x++; err += ABS (inc); if (err >= ABS (thre)) -- 2.20.1