From c79f7e3f6bdfa7483facf03bd76a60b9be5bcc96 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 7 Jul 2009 10:54:44 +0000 Subject: [PATCH] - WS --- ext/gd/libgd/gd.c | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index f01a6904ee..1f5c82b0e7 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -1093,8 +1093,7 @@ void gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color) int w, wstart; int thick = im->thick; - if (color == gdAntiAliased) - { + if (color == gdAntiAliased) { /* gdAntiAliased passed as color: use the much faster, much cheaper and equally attractive gdImageAALine implementation. That @@ -1191,7 +1190,7 @@ TBB: but watch out for /0! */ } else { /* More-or-less vertical. use wid for horizontal stroke */ /* 2.0.12: Michael Schwartz: divide rather than multiply; - TBB: but watch out for /0! */ + TBB: but watch out for /0! */ double as = sin (atan2 (dy, dx)); if (as != 0) { wid = thick / as; @@ -1681,27 +1680,26 @@ void gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e if ((s % 360) == (e % 360)) { s = 0; e = 360; - } else { - if (s > 360) { - s = s % 360; - } - - if (e > 360) { - e = e % 360; - } + } else { + if (s > 360) { + s = s % 360; + } - while (s < 0) { - s += 360; - } + if (e > 360) { + e = e % 360; + } - while (e < s) { - e += 360; - } + while (s < 0) { + s += 360; + } - if (s == e) { + while (e < s) { + e += 360; + } + if (s == e) { s = 0; e = 360; - } - } + } + } for (i = s; i <= e; i++) { int x, y; @@ -1987,7 +1985,7 @@ static void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc) oc = gdImageGetPixel(im, x, y); -/* required! */ + /* required! */ FILL_PUSH(y,x,x,1); /* seed segment (popped 1st) */ FILL_PUSH(y+1, x, x, -1); @@ -2308,7 +2306,6 @@ void gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, i for (x = srcX; (x < (srcX + w)); x++) { int nc; c = gdImageGetPixel (src, x, y); - /* Added 7/24/95: support transparent copies */ if (gdImageGetTransparent(src) == c) { tox++; -- 2.50.1