kalle                                    Tue, 28 Jul 2009 20:35:06 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=286466

Log:
Fixed bug #42434 (ImageLine w/ antialias = 1px shorter)
 - patch by wojjie at gmail dot com

Bug: http://bugs.php.net/42434 (Assigned) ImageLine w/ antialias = 1px shorter
      
Changed paths:
    U   php/php-src/branches/PHP_5_2/NEWS
    U   php/php-src/branches/PHP_5_2/ext/gd/libgd/gd.c
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/gd/libgd/gd.c
    U   php/php-src/trunk/ext/gd/libgd/gd.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===================================================================
--- php/php-src/branches/PHP_5_2/NEWS   2009-07-28 19:28:08 UTC (rev 286465)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-07-28 20:35:06 UTC (rev 286466)
@@ -1,4 +1,4 @@
-PHP                                                                        NEWS
+PHP                                                                        
NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2009, PHP 5.2.11
 - Fixed regression in cURL extension that prevented flush of data to output
@@ -67,6 +67,8 @@
   (Sriram Natarajan)
 - Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
   (Sriram Natarajan)
+- Fixed bug #42434 (ImageLine w/ antialias = 1px shorter). (wojjie at gmail dot
+  com, Kalle)

 17 Jun 2009, PHP 5.2.10
 - Updated timezone database to version 2009.9 (2009i) (Derick)

Modified: php/php-src/branches/PHP_5_2/ext/gd/libgd/gd.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/gd/libgd/gd.c      2009-07-28 19:28:08 UTC 
(rev 286465)
+++ php/php-src/branches/PHP_5_2/ext/gd/libgd/gd.c      2009-07-28 20:35:06 UTC 
(rev 286466)
@@ -1351,7 +1351,7 @@
                x = x1 << 16;
                y = y1 << 16;
                inc = (dy * 65536) / dx;
-               while ((x >> 16) < x2) {
+               while ((x >> 16) <= x2) {
                        gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (y >> 
8) & 0xFF);
                        if ((y >> 16) + 1 < im->sy) {
                                gdImageSetAAPixelColor(im, x >> 16, (y >> 16) + 
1,col, (~y >> 8) & 0xFF);
@@ -1373,7 +1373,7 @@
                x = x1 << 16;
                y = y1 << 16;
                inc = (dx * 65536) / dy;
-               while ((y>>16) < y2) {
+               while ((y>>16) <= y2) {
                        gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (x >> 
8) & 0xFF);
                        if ((x >> 16) + 1 < im->sx) {
                                gdImageSetAAPixelColor(im, (x >> 16) + 1, (y >> 
16),col, (~x >> 8) & 0xFF);

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2009-07-28 19:28:08 UTC (rev 286465)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-07-28 20:35:06 UTC (rev 286466)
@@ -75,6 +75,8 @@
   (Sriram Natarajan)
 - Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
   (Sriram Natarajan)
+- Fixed bug #42434 (ImageLine w/ antialias = 1px shorter). (wojjie at gmail dot
+  com, Kalle)

 30 Jun 2009, PHP 5.3.0
 - Upgraded bundled PCRE to version 7.9. (Nuno)

Modified: php/php-src/branches/PHP_5_3/ext/gd/libgd/gd.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/gd/libgd/gd.c      2009-07-28 19:28:08 UTC 
(rev 286465)
+++ php/php-src/branches/PHP_5_3/ext/gd/libgd/gd.c      2009-07-28 20:35:06 UTC 
(rev 286466)
@@ -1358,7 +1358,7 @@
                x = x1 << 16;
                y = y1 << 16;
                inc = (dy * 65536) / dx;
-               while ((x >> 16) < x2) {
+               while ((x >> 16) <= x2) {
                        gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (y >> 
8) & 0xFF);
                        if ((y >> 16) + 1 < im->sy) {
                                gdImageSetAAPixelColor(im, x >> 16, (y >> 16) + 
1,col, (~y >> 8) & 0xFF);
@@ -1380,7 +1380,7 @@
                x = x1 << 16;
                y = y1 << 16;
                inc = (dx * 65536) / dy;
-               while ((y>>16) < y2) {
+               while ((y>>16) <= y2) {
                        gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (x >> 
8) & 0xFF);
                        if ((x >> 16) + 1 < im->sx) {
                                gdImageSetAAPixelColor(im, (x >> 16) + 1, (y >> 
16),col, (~x >> 8) & 0xFF);

Modified: php/php-src/trunk/ext/gd/libgd/gd.c
===================================================================
--- php/php-src/trunk/ext/gd/libgd/gd.c 2009-07-28 19:28:08 UTC (rev 286465)
+++ php/php-src/trunk/ext/gd/libgd/gd.c 2009-07-28 20:35:06 UTC (rev 286466)
@@ -1358,7 +1358,7 @@
                x = x1 << 16;
                y = y1 << 16;
                inc = (dy * 65536) / dx;
-               while ((x >> 16) < x2) {
+               while ((x >> 16) <= x2) {
                        gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (y >> 
8) & 0xFF);
                        if ((y >> 16) + 1 < im->sy) {
                                gdImageSetAAPixelColor(im, x >> 16, (y >> 16) + 
1,col, (~y >> 8) & 0xFF);
@@ -1380,7 +1380,7 @@
                x = x1 << 16;
                y = y1 << 16;
                inc = (dx * 65536) / dy;
-               while ((y>>16) < y2) {
+               while ((y>>16) <= y2) {
                        gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (x >> 
8) & 0xFF);
                        if ((x >> 16) + 1 < im->sx) {
                                gdImageSetAAPixelColor(im, (x >> 16) + 1, (y >> 
16),col, (~x >> 8) & 0xFF);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to