32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-10-31 18:52:35 +00:00

6.0.059 (2014-02-03)

- SVG 'use' support was imporved.
This commit is contained in:
nicolaasuni 2014-02-03 20:48:23 +00:00
parent 11c74be7c3
commit 92150fd470
5 changed files with 25 additions and 10 deletions

View File

@ -1,3 +1,6 @@
6.0.059 (2014-02-03)
- SVG 'use' support was imporved.
6.0.058 (2014-01-31) 6.0.058 (2014-01-31)
- Bug #886 "Bugs with SVG using <defs> and <use>" was fixed. - Bug #886 "Bugs with SVG using <defs> and <use>" was fixed.

View File

@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------ ------------------------------------------------------------
Name: TCPDF Name: TCPDF
Version: 6.0.058 Version: 6.0.059
Release date: 2014-01-31 Release date: 2014-02-03
Author: Nicola Asuni Author: Nicola Asuni
Copyright (c) 2002-2014: Copyright (c) 2002-2014:

View File

@ -1,6 +1,6 @@
{ {
"name": "tecnick.com/tcpdf", "name": "tecnick.com/tcpdf",
"version": "6.0.058", "version": "6.0.059",
"homepage": "http://www.tcpdf.org/", "homepage": "http://www.tcpdf.org/",
"type": "library", "type": "library",
"description": "TCPDF is a PHP class for generating PDF documents.", "description": "TCPDF is a PHP class for generating PDF documents.",

View File

@ -55,7 +55,7 @@ class TCPDF_STATIC {
* Current TCPDF version. * Current TCPDF version.
* @private static * @private static
*/ */
private static $tcpdf_version = '6.0.058'; private static $tcpdf_version = '6.0.059';
/** /**
* String alias for total number of pages. * String alias for total number of pages.

View File

@ -1,9 +1,9 @@
<?php <?php
//============================================================+ //============================================================+
// File name : tcpdf.php // File name : tcpdf.php
// Version : 6.0.058 // Version : 6.0.059
// Begin : 2002-08-03 // Begin : 2002-08-03
// Last Update : 2014-01-31 // Last Update : 2014-02-03
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com // Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html) // License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -104,7 +104,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 6.0.058 * @version 6.0.059
*/ */
// TCPDF configuration // TCPDF configuration
@ -128,7 +128,7 @@ require_once(dirname(__FILE__).'/include/tcpdf_static.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 6.0.058 * @version 6.0.059
* @author Nicola Asuni - info@tecnick.com * @author Nicola Asuni - info@tecnick.com
*/ */
class TCPDF { class TCPDF {
@ -23632,7 +23632,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
if (end($this->svgdefs) !== FALSE) { if (end($this->svgdefs) !== FALSE) {
$last_svgdefs_id = key($this->svgdefs); $last_svgdefs_id = key($this->svgdefs);
if (isset($this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'])) { if (isset($this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'])) {
$attribs['id'] = 'DF_'.(count($this->svgdefs) + 1); $attribs['id'] = 'DF_'.(count($this->svgdefs[$last_svgdefs_id]['attribs']['child_elements']) + 1);
$this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'][$attribs['id']] = array('name' => $name, 'attribs' => $attribs); $this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'][$attribs['id']] = array('name' => $name, 'attribs' => $attribs);
return; return;
} }
@ -23651,7 +23651,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
// default fill attribute for clipping // default fill attribute for clipping
$attribs['fill'] = 'none'; $attribs['fill'] = 'none';
} }
if (isset($attribs['style']) AND !TCPDF_STATIC::empty_string($attribs['style'])) { if (isset($attribs['style']) AND !TCPDF_STATIC::empty_string($attribs['style']) AND ($attribs['style'][0] != ';')) {
// fix style for regular expression // fix style for regular expression
$attribs['style'] = ';'.$attribs['style']; $attribs['style'] = ';'.$attribs['style'];
} }
@ -23722,6 +23722,11 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
// group together related graphics elements // group together related graphics elements
array_push($this->svgstyles, $svgstyle); array_push($this->svgstyles, $svgstyle);
$this->StartTransform(); $this->StartTransform();
$x = (isset($attribs['x'])?$attribs['x']:0);
$y = (isset($attribs['y'])?$attribs['y']:0);
$w = (isset($attribs['width'])?$attribs['width']:1);
$h = (isset($attribs['height'])?$attribs['height']:1);
$tm = TCPDF_STATIC::getTransformationMatrixProduct($tm, array($w, 0, 0, $h, $x, $y));
$this->SVGTransform($tm); $this->SVGTransform($tm);
$this->setSVGStyles($svgstyle, $prev_svgstyle); $this->setSVGStyles($svgstyle, $prev_svgstyle);
break; break;
@ -24134,6 +24139,13 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
if (isset($use['attribs']['y']) AND isset($attribs['y'])) { if (isset($use['attribs']['y']) AND isset($attribs['y'])) {
$attribs['y'] += $use['attribs']['y']; $attribs['y'] += $use['attribs']['y'];
} }
if (empty($attribs['style'])) {
$attribs['style'] = '';
}
if (!empty($use['attribs']['style'])) {
// merge styles
$attribs['style'] = str_replace(';;',';',';'.$use['attribs']['style'].$attribs['style']);
}
$attribs = array_merge($use['attribs'], $attribs); $attribs = array_merge($use['attribs'], $attribs);
$this->startSVGElementHandler('use-tag', $use['name'], $attribs); $this->startSVGElementHandler('use-tag', $use['name'], $attribs);
return; return;