]> granicus.if.org Git - php/commitdiff
- re-add fix for libgd #106, imagerectangle draws 1x1 rectangles
authorPierre Joye <pajoye@php.net>
Sun, 9 Sep 2007 13:05:51 +0000 (13:05 +0000)
committerPierre Joye <pajoye@php.net>
Sun, 9 Sep 2007 13:05:51 +0000 (13:05 +0000)
  as 1x3 rectangles

ext/gd/libgd/gd.c

index 301072f4e7c2ef373562e300a201ee3a3f09ff06..e419a918831a9c2b9ec7eff89dadc94b48ecb19e 100644 (file)
@@ -2124,6 +2124,11 @@ void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
        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;