diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT
index 3f72b18..0c9582d 100755
--- a/CHANGELOG.TXT
+++ b/CHANGELOG.TXT
@@ -1,3 +1,6 @@
+6.0.010 (2013-04-03)
+ - The method Rect() was fixed to print borders correctly.
+
6.0.009 (2013-04-02)
- Adding back some files that were not properly committed on the latest release.
diff --git a/README.TXT b/README.TXT
index ae4bac1..1a616f7 100755
--- a/README.TXT
+++ b/README.TXT
@@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
-Version: 6.0.009
-Release date: 2013-04-02
+Version: 6.0.010
+Release date: 2013-04-03
Author: Nicola Asuni
Copyright (c) 2002-2013:
diff --git a/composer.json b/composer.json
index bc22720..920f9e5 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,6 @@
{
"name": "tecnick.com/tcpdf",
- "version": "6.0.009",
+ "version": "6.0.010",
"homepage": "http://www.tcpdf.org/",
"type": "library",
"description": "TCPDF is a PHP class for generating PDF documents.",
diff --git a/tcpdf.php b/tcpdf.php
index 2cafdea..abdd15c 100755
--- a/tcpdf.php
+++ b/tcpdf.php
@@ -1,9 +1,9 @@
* @package com.tecnick.tcpdf
* @author Nicola Asuni
- * @version 6.0.009
+ * @version 6.0.010
*/
if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
@@ -168,7 +168,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.
* @package com.tecnick.tcpdf
* @brief PHP class for generating PDF documents without requiring external extensions.
- * @version 6.0.009
+ * @version 6.0.010
* @author Nicola Asuni - info@tecnick.com
*/
class TCPDF {
@@ -11525,7 +11525,7 @@ class TCPDF {
*
all: Line style of all borders. Array like for SetLineStyle().
* L, T, R, B or combinations: Line style of left, top, right or bottom border. Array like for SetLineStyle().
*
- * If a key is not present or is null, not draws the border. Default value: default line style (empty array).
+ * If a key is not present or is null, the correspondent border is not drawn. Default value: default line style (empty array).
* @param $fill_color (array) Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array).
* @public
* @since 1.0
@@ -11535,18 +11535,31 @@ class TCPDF {
if ($this->state != 2) {
return;
}
- if (!(false === strpos($style, 'F')) AND !empty($fill_color)) {
+ if (empty($style)) {
+ $style = 'S';
+ }
+ if (!(strpos($style, 'F') === false) AND !empty($fill_color)) {
+ // set background color
$this->SetFillColorArray($fill_color);
}
- $op = TCPDF_STATIC::getPathPaintOperator($style);
- if ((!$border_style) OR (isset($border_style['all']))) {
- if (isset($border_style['all']) AND $border_style['all']) {
+ if (!empty($border_style)) {
+ if (isset($border_style['all']) AND !empty($border_style['all'])) {
+ //set global style for border
$this->SetLineStyle($border_style['all']);
$border_style = array();
+ } else {
+ // remove stroke operator from style
+ $opnostroke = array('S' => '', 'D' => '', 's' => '', 'd' => '', 'B' => 'F', 'FD' => 'F', 'DF' => 'F', 'B*' => 'F*', 'F*D' => 'F*', 'DF*' => 'F*', 'b' => 'f', 'fd' => 'f', 'df' => 'f', 'b*' => 'f*', 'f*d' => 'f*', 'df*' => 'f*' );
+ if (isset($opnostroke[$style])) {
+ $style = $opnostroke[$style];
+ }
}
}
- $this->_outRect($x, $y, $w, $h, $op);
- if ($border_style) {
+ if (!empty($style)) {
+ $op = TCPDF_STATIC::getPathPaintOperator($style);
+ $this->_outRect($x, $y, $w, $h, $op);
+ }
+ if (!empty($border_style)) {
$border_style2 = array();
foreach ($border_style as $line => $value) {
$length = strlen($line);