Return the center of the image instead of the top-left corner
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Tue, 12 Aug 2008 08:10:15 +0000 (05:10 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Tue, 12 Aug 2008 08:56:45 +0000 (05:56 -0300)
movie.c

diff --git a/movie.c b/movie.c
index f279449..f5ef008 100644 (file)
--- 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))