| @@ -110,9 +110,8 @@ | ||
| 110 | 110 | $usex = $x; |
| 111 | 111 | $usey = $y; |
| 112 | 112 | $usew = $bboxw; |
| 113 | 113 | $useh = $bboxh; |
| 114 | - | |
| 115 | 114 | if ($type < 1) { $type = 2; } |
| 116 | 115 | if ($coords[0]!==false && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i',$coords[0],$m)) { |
| 117 | 116 | $tmp = $this->mpdf->ConvertSize($m[1],$this->mpdf->w,$this->mpdf->FontSize,false); |
| 118 | 117 | if ($tmp) { $coords[0] = $tmp/$w; } |
| @@ -122,10 +121,10 @@ | ||
| 122 | 121 | if ($tmp) { $coords[1] = 1-($tmp/$h); } |
| 123 | 122 | } |
| 124 | 123 | // LINEAR |
| 125 | 124 | if ($type == 2) { |
| 126 | - $angle = (isset($coords[4]) ? $coords[4] : false); | |
| 127 | - $repeat = (isset($coords[5]) ? $coords[5] : false); | |
| 125 | + $angle = $coords[4]; | |
| 126 | + $repeat = $coords[5]; | |
| 128 | 127 | // ALL POINTS SET (default for custom mPDF linear gradient) - no -moz |
| 129 | 128 | if ($coords[0]!==false && $coords[1]!==false && $coords[2]!==false && $coords[3]!==false) { |
| 130 | 129 | // do nothing - coords used as they are |
| 131 | 130 | } |
| @@ -258,13 +257,13 @@ | ||
| 258 | 257 | } |
| 259 | 258 | |
| 260 | 259 | // RADIAL |
| 261 | 260 | else if ($type == 3) { |
| 262 | - $radius = (isset($coords[4]) ? $coords[4] : false); | |
| 263 | - $angle = (isset($coords[5]) ? $coords[5] : false); // ?? no effect | |
| 264 | - $shape = (isset($coords[6]) ? $coords[6] : false); | |
| 265 | - $size = (isset($coords[7]) ? $coords[7] : false); | |
| 266 | - $repeat = (isset($coords[8]) ? $coords[8] : false); | |
| 261 | + $radius = $coords[4]; | |
| 262 | + $angle = $coords[5]; // ?? no effect | |
| 263 | + $shape = $coords[6]; | |
| 264 | + $size = $coords[7]; | |
| 265 | + $repeat = $coords[8]; | |
| 267 | 266 | // ALL POINTS AND RADIUS SET (default for custom mPDF radial gradient) - no -moz |
| 268 | 267 | if ($coords[0]!==false && $coords[1]!==false && $coords[2]!==false && $coords[3]!==false && $coords[4]!==false) { |
| 269 | 268 | // do nothing - coords used as they are |
| 270 | 269 | } |
| @@ -497,9 +496,9 @@ | ||
| 497 | 496 | $tmp = $this->mpdf->ConvertSize($m[1],$this->mpdf->w,$this->mpdf->FontSize,false); |
| 498 | 497 | if ($tmp) { $startx = $m[1]; } |
| 499 | 498 | } |
| 500 | 499 | if (isset($first[1]) && preg_match('/(\d+)[%]/i',$first[1],$m)) { $starty = 1 - ($m[1]/100); } |
| 501 | - else if (!isset($starty) && isset($first[1]) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i',$first[1],$m)) { | |
| 500 | + else if (!isset($starty) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i',$first[1],$m)) { | |
| 502 | 501 | $tmp = $this->mpdf->ConvertSize($m[1],$this->mpdf->w,$this->mpdf->FontSize,false); |
| 503 | 502 | if ($tmp) { $starty = $m[1]; } |
| 504 | 503 | } |
| 505 | 504 | if (isset($startx) && !isset($starty)) { $starty = 0.5; } |
| @@ -598,9 +597,9 @@ | ||
| 598 | 597 | $tmp = $this->mpdf->ConvertSize($m[1],$this->mpdf->w,$this->mpdf->FontSize,false); |
| 599 | 598 | if ($tmp) { $startx = $m[1]; } |
| 600 | 599 | } |
| 601 | 600 | if (isset($first[1]) && preg_match('/(\d+)[%]/i',$first[1],$m)) { $starty = 1 - ($m[1]/100); } |
| 602 | - else if (!isset($starty) && isset($first[1]) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i',$first[1],$m)) { | |
| 601 | + else if (!isset($starty) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i',$first[1],$m)) { | |
| 603 | 602 | $tmp = $this->mpdf->ConvertSize($m[1],$this->mpdf->w,$this->mpdf->FontSize,false); |
| 604 | 603 | if ($tmp) { $starty = $m[1]; } |
| 605 | 604 | } |
| 606 | 605 | |