pajoye Fri Dec 30 01:19:33 2005 EDT Modified files: /php-src/ext/gd/libgd gd.c Log: - add some basic optimisations, usefull when you draw many horizontal or vertical lines like in charts http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/libgd/gd.c?r1=1.91&r2=1.92&diff_format=u Index: php-src/ext/gd/libgd/gd.c diff -u php-src/ext/gd/libgd/gd.c:1.91 php-src/ext/gd/libgd/gd.c:1.92 --- php-src/ext/gd/libgd/gd.c:1.91 Fri Sep 30 20:58:41 2005 +++ php-src/ext/gd/libgd/gd.c Fri Dec 30 01:19:32 2005 @@ -1029,6 +1029,22 @@ return; } + /* Vertical */ + if (x1==x2) { + for (;y1 <= y2; y1++) { + gdImageSetPixel(im, x1,y1, color); + } + return; + } + + /* Horizontal */ + if (y1==y2) { + for (;x1 <= x2; x1++) { + gdImageSetPixel(im, x1,y1, color); + } + return; + } + /* gdAntiAliased passed as color: set anti-aliased line (AAL) global vars. */ if (color == gdAntiAliased) { im->AAL_x1 = x1;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php