diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2016-10-02 12:47:22 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2016-10-02 13:16:40 +0200 |
commit | d0f14a4429e36d8cb70d14067e79fd252eb4ee7a (patch) | |
tree | d7ad641bce7f6f82591614076546cc904b7339bf /ext/gd/libgd | |
parent | 1c74398520bebdce6f0aceb3e3ace00ec965a171 (diff) | |
download | php-git-d0f14a4429e36d8cb70d14067e79fd252eb4ee7a.tar.gz |
Switch to libgd anti-aliased drawing API
Instead of rolling our own in the bundled libgd, we use libgd's anti-aliased
drawing API. This way imageantialias() is also available, when built against
a system libgd.
Diffstat (limited to 'ext/gd/libgd')
-rw-r--r-- | ext/gd/libgd/gd.c | 18 | ||||
-rw-r--r-- | ext/gd/libgd/gd.h | 2 |
2 files changed, 2 insertions, 18 deletions
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 3e742561a6..5c3593ed1b 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -2608,24 +2608,17 @@ void gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c) { int i; int lx, ly; - typedef void (*image_line)(gdImagePtr im, int x1, int y1, int x2, int y2, int color); - image_line draw_line; if (n <= 0) { return; } - if ( im->antialias) { - draw_line = gdImageAALine; - } else { - draw_line = gdImageLine; - } lx = p->x; ly = p->y; - draw_line(im, lx, ly, p[n - 1].x, p[n - 1].y, c); + gdImageLine(im, lx, ly, p[n - 1].x, p[n - 1].y, c); for (i = 1; i < n; i++) { p++; - draw_line(im, lx, ly, p->x, p->y, c); + gdImageLine(im, lx, ly, p->x, p->y, c); lx = p->x; ly = p->y; } @@ -2953,13 +2946,6 @@ void gdImageAlphaBlending (gdImagePtr im, int alphaBlendingArg) im->alphaBlendingFlag = alphaBlendingArg; } -void gdImageAntialias (gdImagePtr im, int antialias) -{ - if (im->trueColor){ - im->antialias = antialias; - } -} - void gdImageSaveAlpha (gdImagePtr im, int saveAlphaArg) { im->saveAlphaFlag = saveAlphaArg; diff --git a/ext/gd/libgd/gd.h b/ext/gd/libgd/gd.h index b56afd1a47..12832ded34 100644 --- a/ext/gd/libgd/gd.h +++ b/ext/gd/libgd/gd.h @@ -222,8 +222,6 @@ typedef struct gdImageStruct { To do that, build your image as a truecolor image, then quantize down to 8 bits. */ int alphaBlendingFlag; - /* Should antialias functions be used */ - int antialias; /* Should the alpha channel of the image be saved? This affects PNG at the moment; other future formats may also have that capability. JPEG doesn't. */ |