mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-11-22 12:55:10 +00:00
4.8.003
This commit is contained in:
parent
3ca2efca07
commit
eed366515b
@ -1,3 +1,10 @@
|
||||
4.8.003 (2009-09-15)
|
||||
- Bug item #2858754 "Division by zero" was fixed.
|
||||
- A bug relative to HTML list items was fixed.
|
||||
- A bug relative to form fields on multiple pages was fixed.
|
||||
- PolyLine() method was added (see example n. 12).
|
||||
- Signature of Polygon() method was changed.
|
||||
|
||||
4.8.002 (2009-09-12)
|
||||
- A problem related to CID-0 fonts offset was fixed: if the $cw[1] entry on the CID-0 font file is not defined, then a CID keys offset is introduced.
|
||||
|
||||
|
@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
||||
------------------------------------------------------------
|
||||
|
||||
Name: TCPDF
|
||||
Version: 4.8.002
|
||||
Release date: 2009-09-12
|
||||
Version: 4.8.003
|
||||
Release date: 2009-09-15
|
||||
Author: Nicola Asuni
|
||||
|
||||
Copyright (c) 2001-2009:
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 12 Sep 2009 11:43:28 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 15 Sep 2009 13:07:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1368,7 +1368,7 @@ $type)</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 12 Sep 2009 11:43:28 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 15 Sep 2009 13:07:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -96,7 +96,7 @@ PHP class to creates array representations for common 1D barcodes to be used wit
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 12 Sep 2009 11:43:28 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 15 Sep 2009 13:07:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -507,7 +507,7 @@ Configuration file for TCPDF.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 12 Sep 2009 11:43:34 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 15 Sep 2009 13:07:08 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -88,7 +88,7 @@ Array of WEB safe colors.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 12 Sep 2009 11:43:29 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 15 Sep 2009 13:07:02 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -73,7 +73,7 @@ This is a PHP class for generating PDF documents without requiring external exte
|
||||
<td><b>author:</b> </td><td>Nicola Asuni</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>version:</b> </td><td>4.8.002</td>
|
||||
<td><b>version:</b> </td><td>4.8.003</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>copyright:</b> </td><td>2002-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com</td>
|
||||
@ -104,7 +104,7 @@ unicode data<br /><br /></div>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_PRODUCER = 'TCPDF 4.8.002 (http://www.tcpdf.org)'</code>
|
||||
<code>PDF_PRODUCER = 'TCPDF 4.8.003 (http://www.tcpdf.org)'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
@ -115,7 +115,7 @@ unicode data<br /><br /></div>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 12 Sep 2009 11:43:29 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 15 Sep 2009 13:07:02 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -237,7 +237,7 @@ Unicode Include file for TCPDF.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 12 Sep 2009 11:43:34 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 15 Sep 2009 13:07:08 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -72,7 +72,7 @@
|
||||
<dt><b>$annots_start_obj_id</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$annots_start_obj_id">TCPDF::$annots_start_obj_id</a><br> Start ID for annotation objects</dd>
|
||||
<dt><b>$annot_obj_id</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$annot_obj_id">TCPDF::$annot_obj_id</a><br> Current ID of annotation object</dd>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$annot_obj_id">TCPDF::$annot_obj_id</a><br> Max ID of annotation object</dd>
|
||||
<dt><b>$apxo_obj_id</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$apxo_obj_id">TCPDF::$apxo_obj_id</a><br> Current ID of appearance streams XObjects</dd>
|
||||
<dt><b>$apxo_start_obj_id</b></dt>
|
||||
@ -209,6 +209,8 @@
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$CurrentFont">TCPDF::$CurrentFont</a></dd>
|
||||
<dt><b>$currpagegroup</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$currpagegroup">TCPDF::$currpagegroup</a><br> Contains the alias of the current page group</dd>
|
||||
<dt><b>$curr_annot_obj_id</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$curr_annot_obj_id">TCPDF::$curr_annot_obj_id</a><br> Current ID of annotation object</dd>
|
||||
<dt><b>$customlistindent</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$customlistindent">TCPDF::$customlistindent</a></dd>
|
||||
<dt><b>Cell</b></dt>
|
||||
@ -879,6 +881,8 @@
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodPolycurve">TCPDF::Polycurve()</a><br> Draws a poly-Bezier curve.</dd>
|
||||
<dt><b>Polygon</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodPolygon">TCPDF::Polygon()</a><br> Draws a polygon.</dd>
|
||||
<dt><b>PolyLine</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodPolyLine">TCPDF::PolyLine()</a><br> Draws a polygonal line</dd>
|
||||
<dt><b>putHtmlListBullet</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodputHtmlListBullet">TCPDF::putHtmlListBullet()</a><br> Output an HTML list bullet or ordered item symbol</dd>
|
||||
</dl>
|
||||
@ -1430,7 +1434,7 @@
|
||||
<a href="elementindex.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 12 Sep 2009 11:43:28 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 15 Sep 2009 13:07:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -227,7 +227,7 @@
|
||||
<dt><b>$annots_start_obj_id</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$annots_start_obj_id">TCPDF::$annots_start_obj_id</a><br> Start ID for annotation objects</dd>
|
||||
<dt><b>$annot_obj_id</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$annot_obj_id">TCPDF::$annot_obj_id</a><br> Current ID of annotation object</dd>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$annot_obj_id">TCPDF::$annot_obj_id</a><br> Max ID of annotation object</dd>
|
||||
<dt><b>$apxo_obj_id</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$apxo_obj_id">TCPDF::$apxo_obj_id</a><br> Current ID of appearance streams XObjects</dd>
|
||||
<dt><b>$apxo_start_obj_id</b></dt>
|
||||
@ -364,6 +364,8 @@
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$CurrentFont">TCPDF::$CurrentFont</a></dd>
|
||||
<dt><b>$currpagegroup</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$currpagegroup">TCPDF::$currpagegroup</a><br> Contains the alias of the current page group</dd>
|
||||
<dt><b>$curr_annot_obj_id</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$curr_annot_obj_id">TCPDF::$curr_annot_obj_id</a><br> Current ID of annotation object</dd>
|
||||
<dt><b>$customlistindent</b></dt>
|
||||
<dd>in file tcpdf.php, variable <a href="com-tecnick-tcpdf/TCPDF.html#var$customlistindent">TCPDF::$customlistindent</a></dd>
|
||||
<dt><b>Cell</b></dt>
|
||||
@ -1034,6 +1036,8 @@
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodPolycurve">TCPDF::Polycurve()</a><br> Draws a poly-Bezier curve.</dd>
|
||||
<dt><b>Polygon</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodPolygon">TCPDF::Polygon()</a><br> Draws a polygon.</dd>
|
||||
<dt><b>PolyLine</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodPolyLine">TCPDF::PolyLine()</a><br> Draws a polygonal line</dd>
|
||||
<dt><b>putHtmlListBullet</b></dt>
|
||||
<dd>in file tcpdf.php, method <a href="com-tecnick-tcpdf/TCPDF.html#methodputHtmlListBullet">TCPDF::putHtmlListBullet()</a><br> Output an HTML list bullet or ordered item symbol</dd>
|
||||
</dl>
|
||||
@ -1453,7 +1457,7 @@
|
||||
<a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 12 Sep 2009 11:43:28 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 15 Sep 2009 13:07:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -35,7 +35,7 @@
|
||||
<a href="#Post-parsing">Post-parsing</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 12 Sep 2009 11:43:34 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 15 Sep 2009 13:07:08 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -58,7 +58,7 @@
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.1</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 12 Sep 2009 11:43:28 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 15 Sep 2009 13:07:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -58,7 +58,7 @@
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.1</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Sat, 12 Sep 2009 11:43:28 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
Documentation generated on Tue, 15 Sep 2009 13:07:01 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -2,7 +2,7 @@
|
||||
//============================================================+
|
||||
// File name : example_012.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-08-30
|
||||
// Last Update : 2009-09-14
|
||||
//
|
||||
// Description : Example 012 for TCPDF class
|
||||
// Graphic Functions
|
||||
@ -122,7 +122,11 @@ $pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'da
|
||||
$pdf->Polygon(array(5,135,45,135,15,165));
|
||||
$pdf->Polygon(array(60,135,80,135,80,155,70,165,50,155), 'DF', array($style6, $style7, $style7, 0, $style6), array(220, 200, 200));
|
||||
$pdf->Polygon(array(120,135,140,135,150,155,110,155), 'D', array($style6, 0, $style7, $style6));
|
||||
$pdf->Polygon(array(160,135,190,155,170,155,200,160,160,165), 'DF', array('all' => $style6), array(220, 220, 220));
|
||||
$pdf->Polygon(array(160,135,190,155,170,155,200,160,160,165), 'DF', array('all' => $style6), array(220, 220, 220));
|
||||
|
||||
// Polygonal Line
|
||||
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 164)));
|
||||
$pdf->PolyLine(array(80,165,90,160,100,165,110,160,120,165,130,160,140,165), 'D', array(), array());
|
||||
|
||||
// Regular polygon
|
||||
$pdf->Text(5, 172, 'Regular polygon examples');
|
||||
|
98
tcpdf.php
98
tcpdf.php
@ -2,9 +2,9 @@
|
||||
//============================================================+
|
||||
// File name : tcpdf.php
|
||||
// Begin : 2002-08-03
|
||||
// Last Update : 2009-09-12
|
||||
// Last Update : 2009-09-15
|
||||
// Author : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org
|
||||
// Version : 4.8.002
|
||||
// Version : 4.8.003
|
||||
// License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright (C) 2002-2009 Nicola Asuni - Tecnick.com S.r.l.
|
||||
@ -128,7 +128,7 @@
|
||||
* @copyright 2002-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://www.tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @version 4.8.002
|
||||
* @version 4.8.003
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -152,14 +152,14 @@ if (!class_exists('TCPDF', false)) {
|
||||
/**
|
||||
* define default PDF document producer
|
||||
*/
|
||||
define('PDF_PRODUCER', 'TCPDF 4.8.002 (http://www.tcpdf.org)');
|
||||
define('PDF_PRODUCER', 'TCPDF 4.8.003 (http://www.tcpdf.org)');
|
||||
|
||||
/**
|
||||
* This is a PHP class for generating PDF documents without requiring external extensions.<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>
|
||||
* @name TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @version 4.8.002
|
||||
* @version 4.8.003
|
||||
* @author Nicola Asuni - info@tecnick.com
|
||||
* @link http://www.tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
@ -1354,12 +1354,19 @@ if (!class_exists('TCPDF', false)) {
|
||||
protected $annots_start_obj_id = 200000;
|
||||
|
||||
/**
|
||||
* Current ID of annotation object
|
||||
* Max ID of annotation object
|
||||
* @access protected
|
||||
* @since 4.7.000 (2009-08-29)
|
||||
*/
|
||||
protected $annot_obj_id = 200000;
|
||||
|
||||
/**
|
||||
* Current ID of annotation object
|
||||
* @access protected
|
||||
* @since 4.8.003 (2009-09-15)
|
||||
*/
|
||||
protected $curr_annot_obj_id = 200000;
|
||||
|
||||
/**
|
||||
* List of form annotations IDs
|
||||
* @access protected
|
||||
@ -1583,6 +1590,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
$this->re_spaces = '/[\s]/';
|
||||
}
|
||||
$this->annot_obj_id = $this->annots_start_obj_id;
|
||||
$this->curr_annot_obj_id = $this->annots_start_obj_id;
|
||||
$this->apxo_obj_id = $this->apxo_start_obj_id;
|
||||
$this->js_obj_id = $this->js_start_obj_id;
|
||||
$this->default_form_prop = array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 255), 'strokeColor'=>array(128, 128, 128));
|
||||
@ -3737,8 +3745,11 @@ if (!class_exists('TCPDF', false)) {
|
||||
// text lenght
|
||||
$width = $this->GetStringWidth($txt);
|
||||
// ratio between cell lenght and text lenght
|
||||
$ratio = ($w - (2 * $this->cMargin)) / $width;
|
||||
|
||||
if ($width <= 0) {
|
||||
$ratio = 1;
|
||||
} else {
|
||||
$ratio = ($w - (2 * $this->cMargin)) / $width;
|
||||
}
|
||||
// stretch text if required
|
||||
if (($stretch > 0) AND (($ratio < 1) OR (($ratio > 1) AND (($stretch % 2) == 0)))) {
|
||||
if ($stretch > 2) {
|
||||
@ -5588,11 +5599,16 @@ if (!class_exists('TCPDF', false)) {
|
||||
return;
|
||||
}
|
||||
$this->_out('/Annots [');
|
||||
for ($i = ($this->annots_start_obj_id + 1); $i <= $this->annot_obj_id; ++$i) {
|
||||
if (!in_array($i, $this->radio_groups)) {
|
||||
$this->_out($i.' 0 R');
|
||||
$num_annots = count($this->PageAnnots[$n]);
|
||||
for ($i = 0; $i < $num_annots; ++$i) {
|
||||
++$this->curr_annot_obj_id;
|
||||
if (!in_array($this->curr_annot_obj_id, $this->radio_groups)) {
|
||||
$this->_out($this->curr_annot_obj_id.' 0 R');
|
||||
} else {
|
||||
++$num_annots;
|
||||
}
|
||||
}
|
||||
|
||||
if (($n==1) AND $this->sign AND isset($this->signature_data['cert_type'])) {
|
||||
// set reference for signature object
|
||||
$this->_out($this->sig_annot_ref);
|
||||
@ -8744,7 +8760,33 @@ if (!class_exists('TCPDF', false)) {
|
||||
public function Circle($x0, $y0, $r, $astart=0, $afinish=360, $style='', $line_style=array(), $fill_color=array(), $nc=8) {
|
||||
$this->Ellipse($x0, $y0, $r, 0, 0, $astart, $afinish, $style, $line_style, $fill_color, $nc);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Draws a polygonal line
|
||||
* @param array $p Points 0 to ($np - 1). Array with values (x0, y0, x1, y1,..., x(np-1), y(np - 1))
|
||||
* @param string $style Style of rendering. Possible values are:
|
||||
* <ul>
|
||||
* <li>D or empty string: Draw (default).</li>
|
||||
* <li>F: Fill.</li>
|
||||
* <li>DF or FD: Draw and fill.</li>
|
||||
* <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li>
|
||||
* <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li>
|
||||
* </ul>
|
||||
* @param array $line_style Line style of polygon. Array with keys among the following:
|
||||
* <ul>
|
||||
* <li>all: Line style of all lines. Array like for {@link SetLineStyle SetLineStyle}.</li>
|
||||
* <li>0 to ($np - 1): Line style of each line. Array like for {@link SetLineStyle SetLineStyle}.</li>
|
||||
* </ul>
|
||||
* If a key is not present or is null, not draws the line. Default value is default line style (empty array).
|
||||
* @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).
|
||||
* @param boolean $closed if true the polygon is closes, otherwise will remain open
|
||||
* @access public
|
||||
* @since 4.8.003 (2009-09-15)
|
||||
*/
|
||||
public function PolyLine($p, $style='', $line_style=array(), $fill_color=array()) {
|
||||
$this->Polygon($p, $style, $line_style, $fill_color, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws a polygon.
|
||||
* @param array $p Points 0 to ($np - 1). Array with values (x0, y0, x1, y1,..., x(np-1), y(np - 1))
|
||||
@ -8763,21 +8805,24 @@ if (!class_exists('TCPDF', false)) {
|
||||
* </ul>
|
||||
* If a key is not present or is null, not draws the line. Default value is default line style (empty array).
|
||||
* @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K). Default value: default color (empty array).
|
||||
* @param boolean $closed if true the polygon is closes, otherwise will remain open
|
||||
* @access public
|
||||
* @since 2.1.000 (2008-01-08)
|
||||
*/
|
||||
public function Polygon($p, $style='', $line_style=array(), $fill_color=array()) {
|
||||
public function Polygon($p, $style='', $line_style=array(), $fill_color=array(), $closed=true) {
|
||||
$nc = count($p); // number of coordinates
|
||||
$np = $nc / 2; // number of points
|
||||
for ($i = 0; $i < 4; ++$i) {
|
||||
if ($closed) {
|
||||
// close polygon by adding the first 2 points at the end (one line)
|
||||
$p[$nc + $i] = $p[$i];
|
||||
for ($i = 0; $i < 4; ++$i) {
|
||||
$p[$nc + $i] = $p[$i];
|
||||
}
|
||||
// copy style for the last added line
|
||||
if (isset($line_style[0])) {
|
||||
$line_style[$np] = $line_style[0];
|
||||
}
|
||||
$nc += 4;
|
||||
}
|
||||
// copy style for the last added line
|
||||
if (isset($line_style[0])) {
|
||||
$line_style[$np] = $line_style[0];
|
||||
}
|
||||
$nc += 4;
|
||||
if (!(false === strpos($style, 'F')) AND isset($fill_color)) {
|
||||
$this->SetFillColorArray($fill_color);
|
||||
}
|
||||
@ -12936,7 +12981,15 @@ if (!class_exists('TCPDF', false)) {
|
||||
} else {
|
||||
$this->listindent = $this->GetStringWidth('0000');
|
||||
}
|
||||
// save previous list state
|
||||
$prev_listnum = $this->listnum;
|
||||
$prev_listordered = $this->listordered;
|
||||
$prev_listcount = $this->listcount;
|
||||
$prev_lispacer = $this->lispacer;
|
||||
$this->listnum = 0;
|
||||
$this->listordered = array();
|
||||
$this->listcount = array();
|
||||
$this->lispacer = '';
|
||||
if (($this->empty_string($this->lasth)) OR ($reseth)) {
|
||||
//set row height
|
||||
$this->lasth = $this->FontSize * $this->cell_height_ratio;
|
||||
@ -13730,6 +13783,11 @@ if (!class_exists('TCPDF', false)) {
|
||||
$this->lMargin = $this->pagedim[$this->page]['olm'];
|
||||
$this->rMargin = $this->pagedim[$this->page]['orm'];
|
||||
}
|
||||
// restore previous list state
|
||||
$this->listnum = $prev_listnum;
|
||||
$this->listordered = $prev_listordered;
|
||||
$this->listcount = $prev_listcount;
|
||||
$this->lispacer = $prev_lispacer;
|
||||
unset($dom);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user