com php-src: Remove unused code which is also not there in external libgd: ext/gd/libgd/gd_rotate.c
| From: | Christoph Michael Becker | Date: | Wed, 14 Sep 2016 15:01:41 +0000 |
| Subject: | com php-src: Remove unused code which is also not there in external libgd: ext/gd/libgd/gd_rotate.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94520@lists.php.net to get a copy of this message | ||
Commit: f81f40fbd3d312b5fc4a9ab89202d42cac77f833
Author: Christoph M. Becker <cmbecker69@gmx.de> Wed, 14 Sep 2016 17:01:41 +0200
Parents: aad54b7c5fcfecd2ca49292f45a5808c51359a86
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f81f40fbd3d312b5fc4a9ab89202d42cac77f833
Log:
Remove unused code which is also not there in external libgd
Changed paths:
M ext/gd/libgd/gd_rotate.c
Diff:
diff --git a/ext/gd/libgd/gd_rotate.c b/ext/gd/libgd/gd_rotate.c
index e94809a..6284bcd 100644
--- a/ext/gd/libgd/gd_rotate..c
+++ b/ext/gd/libgd/gd_rotate.c
@@ -346,9 +346,7 @@ gdImagePtr gdImageRotate270 (gdImagePtr src, int ignoretransparent)
gdImagePtr gdImageRotate45 (gdImagePtr src, double dAngle, int clrBack, int ignoretransparent)
{
- typedef int (*FuncPtr)(gdImagePtr, int, int);
gdImagePtr dst1,dst2,dst3;
- FuncPtr f;
double dRadAngle, dSinE, dTan, dShear;
double dOffset; /* Variable skew offset */
int u, iShear, newx, newy;
@@ -363,12 +361,6 @@ gdImagePtr gdImageRotate45 (gdImagePtr src, double dAngle, int clrBack, int
igno
newy = src->sy;
/* 1st shear */
- if (src->trueColor) {
- f = gdImageGetTrueColorPixel;
- } else {
- f = gdImageGetPixel;
- }
-
dst1 = gdImageCreateTrueColor(newx, newy);
/******* Perform 1st shear (horizontal) ******/
if (dst1 == NULL) {
@@ -396,10 +388,6 @@ gdImagePtr gdImageRotate45 (gdImagePtr src, double dAngle, int clrBack, int
igno
}
}
- dRadAngle = dAngle * ROTATE_DEG2RAD; /* Angle in radians */
- dSinE = sin (dRadAngle);
- dTan = tan (dRadAngle / 2.0);
-
for (u = 0; u < dst1->sy; u++) {
if (dTan >= 0.0) {
dShear = ((double)(u + 0.5)) * dTan;
@@ -433,11 +421,6 @@ gdImagePtr gdImageRotate45 (gdImagePtr src, double dAngle, int clrBack, int
igno
newy = (int) ((double) src->sx * fabs( dSinE ) + (double) src->sy * cos (dRadAngle))+1;
- if (src->trueColor) {
- f = gdImageGetTrueColorPixel;
- } else {
- f = gdImageGetPixel;
- }
dst2 = gdImageCreateTrueColor(newx, newy);
if (dst2 == NULL) {
gdImageDestroy(dst1);
@@ -465,11 +448,6 @@ gdImagePtr gdImageRotate45 (gdImagePtr src, double dAngle, int clrBack, int
igno
newx = (int) ((double)src->sy * fabs (dSinE) + (double)src->sx * cos (dRadAngle)) + 1;
newy = dst2->sy;
- if (src->trueColor) {
- f = gdImageGetTrueColorPixel;
- } else {
- f = gdImageGetPixel;
- }
dst3 = gdImageCreateTrueColor(newx, newy);
if (dst3 == NULL) {
gdImageDestroy(dst2);