Commits

Anonymous committed 327582a

- MFB: #78,gdImageFilledRectangle() draws nothing with reversed points
(x1,y1) > (x2,y2)

Comments (0)

Files changed (1)

   if (y1 > gdImageSY (im))
     y1 = gdImageSY (im);
 
+  if (x1 > x2) {
+	  x = x1;
+	  x1 = x2;
+	  x2 = x;
+  }
+  if (y1 > y2) {
+	  y = y1;
+	  y1 = y2;
+	  y2 = y;
+  }
+
   for (y = y1; (y <= y2); y++)
     {
       for (x = x1; (x <= x2); x++)