32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-11-22 12:55:10 +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)
- Bug item #3486880 "$filehash undefine error" was fixed.
- 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
Version: 5.9.146
Release date: 2012-02-12
Version: 5.9.147
Release date: 2012-02-14
Author: Nicola Asuni
Copyright (c) 2002-2012:

View File

@ -1,9 +1,9 @@
<?php
//============================================================+
// File name : tcpdf.php
// Version : 5.9.146
// Version : 5.9.147
// 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
// 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>
* @package com.tecnick.tcpdf
* @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.
@ -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>
* @package com.tecnick.tcpdf
* @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
*/
class TCPDF {
@ -160,7 +160,7 @@ class TCPDF {
* Current TCPDF version.
* @private
*/
private $tcpdf_version = '5.9.146';
private $tcpdf_version = '5.9.147';
// 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])) {
$gradient['coords'][4] = $this->getHTMLUnitToUnits($gradient['coords'][4], 0, $this->svgunit, false);
}
if ($w <= $minlen) {
$w = $minlen;
}
if ($h <= $minlen) {
$h = $minlen;
}
// shift units
if ($gradient['gradientUnits'] == 'objectBoundingBox') {
// 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'][3] += $y;
}
if ($w <= $minlen) {
$w = $minlen;
}
if ($h <= $minlen) {
$h = $minlen;
}
// calculate percentages
$gradient['coords'][0] = ($gradient['coords'][0] - $x) / $w;
$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') {
foreach($gradient['coords'] as $key => $val) {
$gradient['coords'][$key] = (intval($val) / 100);
}
}
// fix values
foreach($gradient['coords'] as $key => $val) {
if ($val < 0) {
$gradient['coords'][$key] = 0;
} elseif ($val > 1) {
$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])) {
@ -27734,7 +27731,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$gradient['coords'][3] = $tmp;
// set transformation map for gradient
if ($gradient['type'] == 3) {
// gradient is always circular
// circular gradient
$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));
} else {