com php-src: Refactor according to libgd: ext/gd/libgd/gd.c
| From: | Christoph Michael Becker | Date: | Mon, 12 Sep 2016 20:37:32 +0000 |
| Subject: | com php-src: Refactor according to libgd: ext/gd/libgd/gd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94434@lists.php.net to get a copy of this message | ||
Commit: abb90fbc34982dd8b216bb8f3e0c5ff1a156d60d
Author: Christoph M. Becker <cmbecker69@gmx.de> Mon, 12 Sep 2016 22:37:32 +0200
Parents: 01e798fa360bcd89980d1946503a8e0f8a2fd357
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=abb90fbc34982dd8b216bb8f3e0c5ff1a156d60d
Log:
Refactor according to libgd
Cf. <https://github.com/libgd/libgd/commit/a3016ad0>.
Changed paths:
M ext/gd/libgd/gd.c
Diff:
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index 928fdb8..3568684 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -2055,7 +2055,6 @@ skip: for(x++; x<=x2 && (pts[y][x] || gdImageGetPixel(im,x,
y)!=oc); x++);
void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
{
- int x1h = x1, x1v = x1, y1h = y1, y1v = y1, x2h = x2, x2v = x2, y2h = y2, y2v = y2;
int thick = im->thick;
int t;
@@ -2076,7 +2075,6 @@ void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int
color)
x2 = t;
}
- x1h = x1; x1v = x1; y1h = y1; y1v = y1; x2h = x2; x2v = x2; y2h = y2; y2v = y2;
if (thick > 1) {
int cx, cy, x1ul, y1ul, x2lr, y2lr;
int half = thick >> 1;
@@ -2124,12 +2122,10 @@ void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int
color)
if (x1 == x2 || y1 == y2) {
gdImageLine(im, x1, y1, x2, y2, color);
} else {
- y1v = y1h + 1;
- y2v = y2h - 1;
- gdImageLine(im, x1h, y1h, x2h, y1h, color);
- gdImageLine(im, x1h, y2h, x2h, y2h, color);
- gdImageLine(im, x1v, y1v, x1v, y2v, color);
- gdImageLine(im, x2v, y1v, x2v, y2v, color);
+ gdImageLine(im, x1, y1, x2, y1, color);
+ gdImageLine(im, x1, y2, x2, y2, color);
+ gdImageLine(im, x1, y1 + 1, x1, y2 - 1, color);
+ gdImageLine(im, x2, y1 + 1, x2, y2 - 1, color);
}
}
}