30
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-05-31 21:30:47 +00:00
This commit is contained in:
nicolaasuni 2012-02-14 18:36:13 +00:00
parent b83d9938d2
commit 0f52571831
3 changed files with 22 additions and 22 deletions

View File

@ -1,3 +1,6 @@
5.9.147 (2012-02-14)
- A problem with SVG gradients has been fixed.
5.9.146 (2012-02-12) 5.9.146 (2012-02-12)
- Bug item #3486880 "$filehash undefine error" was fixed. - Bug item #3486880 "$filehash undefine error" was fixed.
- The default font is now the one specified at PDF_FONT_NAME_MAIN constant. - The default font is now the one specified at PDF_FONT_NAME_MAIN constant.

View File

@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------ ------------------------------------------------------------
Name: TCPDF Name: TCPDF
Version: 5.9.146 Version: 5.9.147
Release date: 2012-02-12 Release date: 2012-02-14
Author: Nicola Asuni Author: Nicola Asuni
Copyright (c) 2002-2012: Copyright (c) 2002-2012:

View File

@ -1,9 +1,9 @@
<?php <?php
//============================================================+ //============================================================+
// File name : tcpdf.php // File name : tcpdf.php
// Version : 5.9.146 // Version : 5.9.147
// Begin : 2002-08-03 // Begin : 2002-08-03
// Last Update : 2012-02-12 // Last Update : 2012-02-14
// Author : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com // Author : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
// License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3 // License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -137,7 +137,7 @@
* Tools to encode your unicode fonts are on fonts/utils directory.</p> * Tools to encode your unicode fonts are on fonts/utils directory.</p>
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
* @author Nicola Asuni * @author Nicola Asuni
* @version 5.9.146 * @version 5.9.147
*/ */
// Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file. // Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file.
@ -149,7 +149,7 @@ require_once(dirname(__FILE__).'/config/tcpdf_config.php');
* TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br> * TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br>
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
* @brief PHP class for generating PDF documents without requiring external extensions. * @brief PHP class for generating PDF documents without requiring external extensions.
* @version 5.9.146 * @version 5.9.147
* @author Nicola Asuni - info@tecnick.com * @author Nicola Asuni - info@tecnick.com
*/ */
class TCPDF { class TCPDF {
@ -160,7 +160,7 @@ class TCPDF {
* Current TCPDF version. * Current TCPDF version.
* @private * @private
*/ */
private $tcpdf_version = '5.9.146'; private $tcpdf_version = '5.9.147';
// Protected properties // Protected properties
@ -27686,6 +27686,12 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
if (isset($gradient['coords'][4])) { if (isset($gradient['coords'][4])) {
$gradient['coords'][4] = $this->getHTMLUnitToUnits($gradient['coords'][4], 0, $this->svgunit, false); $gradient['coords'][4] = $this->getHTMLUnitToUnits($gradient['coords'][4], 0, $this->svgunit, false);
} }
if ($w <= $minlen) {
$w = $minlen;
}
if ($h <= $minlen) {
$h = $minlen;
}
// shift units // shift units
if ($gradient['gradientUnits'] == 'objectBoundingBox') { if ($gradient['gradientUnits'] == 'objectBoundingBox') {
// convert to SVG coordinate system // convert to SVG coordinate system
@ -27694,12 +27700,6 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$gradient['coords'][2] += $x; $gradient['coords'][2] += $x;
$gradient['coords'][3] += $y; $gradient['coords'][3] += $y;
} }
if ($w <= $minlen) {
$w = $minlen;
}
if ($h <= $minlen) {
$h = $minlen;
}
// calculate percentages // calculate percentages
$gradient['coords'][0] = ($gradient['coords'][0] - $x) / $w; $gradient['coords'][0] = ($gradient['coords'][0] - $x) / $w;
$gradient['coords'][1] = ($gradient['coords'][1] - $y) / $h; $gradient['coords'][1] = ($gradient['coords'][1] - $y) / $h;
@ -27711,14 +27711,11 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
} elseif ($gradient['mode'] == 'percentage') { } elseif ($gradient['mode'] == 'percentage') {
foreach($gradient['coords'] as $key => $val) { foreach($gradient['coords'] as $key => $val) {
$gradient['coords'][$key] = (intval($val) / 100); $gradient['coords'][$key] = (intval($val) / 100);
} if ($val < 0) {
} $gradient['coords'][$key] = 0;
// fix values } elseif ($val > 1) {
foreach($gradient['coords'] as $key => $val) { $gradient['coords'][$key] = 1;
if ($val < 0) { }
$gradient['coords'][$key] = 0;
} elseif ($val > 1) {
$gradient['coords'][$key] = 1;
} }
} }
if (($gradient['type'] == 2) AND ($gradient['coords'][0] == $gradient['coords'][2]) AND ($gradient['coords'][1] == $gradient['coords'][3])) { if (($gradient['type'] == 2) AND ($gradient['coords'][0] == $gradient['coords'][2]) AND ($gradient['coords'][1] == $gradient['coords'][3])) {
@ -27734,7 +27731,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$gradient['coords'][3] = $tmp; $gradient['coords'][3] = $tmp;
// set transformation map for gradient // set transformation map for gradient
if ($gradient['type'] == 3) { if ($gradient['type'] == 3) {
// gradient is always circular // circular gradient
$cy = $this->h - $y - ($gradient['coords'][1] * ($w + $h)); $cy = $this->h - $y - ($gradient['coords'][1] * ($w + $h));
$this->_out(sprintf('%.3F 0 0 %.3F %.3F %.3F cm', $w*$this->k, $w*$this->k, $x*$this->k, $cy*$this->k)); $this->_out(sprintf('%.3F 0 0 %.3F %.3F %.3F cm', $w*$this->k, $w*$this->k, $x*$this->k, $cy*$this->k));
} else { } else {