From: Thadeu Lima de Souza Cascardo Date: Tue, 12 Aug 2008 08:10:15 +0000 (-0300) Subject: Return the center of the image instead of the top-left corner X-Git-Tag: cairo~2 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fmovie.git;a=commitdiff_plain;h=9538b68a7cccd97a1c7aa3a933a4a100ae55ec99 Return the center of the image instead of the top-left corner --- 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))