cvs: gd(GD_2_0) /libgd NEWS gd.c /libgd/tests/gdimagefilledrectangle bug00106.c /libgd/tests/gdimagerectangle bug00106.c

[email protected] ("Pierre-Alain Joye") Sun, 26 Aug 2007 19:35:56 -0000
Newsgroups php.gd.cvs
Message-ID <cvspajoye1188156956@cvsserver>
pajoye		Sun Aug 26 19:35:56 2007 UTC

  Added files:                 (Branch: GD_2_0)
    /gd/libgd/tests/gdimagefilledrectangle	bug00106.c 
    /gd/libgd/tests/gdimagerectangle	bug00106.c 

  Modified files:              
    /gd/libgd	gd.c NEWS 
  Log:
  - #106, gdImageRectangle draws 1x1 rectangles as 1x3 rectangles 
  
  
http://cvs.php.net/viewvc.cgi/gd/libgd/gd.c?r1=1.49.2.18&r2=1.49.2.19&diff_format=u
Index: gd/libgd/gd.c
diff -u gd/libgd/gd.c:1.49.2.18 gd/libgd/gd.c:1.49.2.19
--- gd/libgd/gd.c:1.49.2.18	Wed Aug  8 16:58:08 2007
+++ gd/libgd/gd.c	Sun Aug 26 19:35:56 2007
@@ -1,4 +1,4 @@
-/* $Id: gd.c,v 1.49.2.18 2007/08/08 16:58:08 mattias Exp $ */
+/* $Id: gd.c,v 1.49.2.19 2007/08/26 19:35:56 pajoye Exp $ */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -2131,6 +2131,12 @@
 	int half1 = 1;
 	int t;
 
+
+	if (x1 == x2 && y1 == y2 && thick == 1) {
+			gdImageSetPixel(im, x1, y1, color);
+			return;
+	}
+
 	if (y2 < y1) {
 		t=y1;
 		y1 = y2;
@@ -2145,6 +2151,7 @@
 	if (thick > 1) {
 		int cx, cy, x1ul, y1ul, x2lr, y2lr;
 		int half = thick >> 1;
+
 		half1 = thick - half;
 		x1ul = x1 - half;
 		y1ul = y1 - half;
http://cvs.php.net/viewvc.cgi/gd/libgd/NEWS?r1=1.4.2.29&r2=1.4.2.30&diff_format=u
Index: gd/libgd/NEWS
diff -u gd/libgd/NEWS:1.4.2.29 gd/libgd/NEWS:1.4.2.30
--- gd/libgd/NEWS:1.4.2.29	Wed Aug  8 12:57:46 2007
+++ gd/libgd/NEWS	Sun Aug 26 19:35:56 2007
@@ -5,6 +5,7 @@
  97, ease the creation of regexps to match symbols/functions
 101, _gdCreateFromFile() can crash if gdImageCreate fails (Mattias Bengtsson)
 105, gdImageCreateFrom*Ptr() can crash if gdNewDynamicCtxEx() fails (Mattias)
+106, gdImageRectangle draws 1x1 rectangles as 1x3 rectangles (Pierre)
 109, Possible integer overflow in gdImageFill() (Mattias Bengtsson)
 
 GD 2.0.35 (2007-06-21)

http://cvs.php.net/viewvc.cgi/gd/libgd/tests/gdimagefilledrectangle/bug00106.c?view=markup&rev=1.1
Index: gd/libgd/tests/gdimagefilledrectangle/bug00106.c
+++ gd/libgd/tests/gdimagefilledrectangle/bug00106.c

http://cvs.php.net/viewvc.cgi/gd/libgd/tests/gdimagerectangle/bug00106.c?view=markup&rev=1.1
Index: gd/libgd/tests/gdimagerectangle/bug00106.c
+++ gd/libgd/tests/gdimagerectangle/bug00106.c