diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 6930131..62d519f 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,6 @@ +4.7.001 (2009-08-30) + - The Polygon() and Arrow() methods were fixed and improved (see example n. 12). + 4.7.000 (2009-08-29) - This is a major release. - Some procedures were internally optimized. diff --git a/README.TXT b/README.TXT index 3a4d11b..dba81c8 100755 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 4.7.000 -Release date: 2009-08-29 +Version: 4.7.001 +Release date: 2009-08-30 Author: Nicola Asuni Copyright (c) 2001-2009: diff --git a/doc/classtrees_com-tecnick-tcpdf.html b/doc/classtrees_com-tecnick-tcpdf.html index 15b4075..8dd0e4e 100644 --- a/doc/classtrees_com-tecnick-tcpdf.html +++ b/doc/classtrees_com-tecnick-tcpdf.html @@ -45,7 +45,7 @@

- Documentation generated on Sat, 29 Aug 2009 18:09:07 +0200 by phpDocumentor 1.4.1 + Documentation generated on Sun, 30 Aug 2009 10:53:24 +0200 by phpDocumentor 1.4.1
diff --git a/doc/com-tecnick-tcpdf/TCPDF.html b/doc/com-tecnick-tcpdf/TCPDF.html index 1d342a1..26b9424 100644 --- a/doc/com-tecnick-tcpdf/TCPDF.html +++ b/doc/com-tecnick-tcpdf/TCPDF.html @@ -74,7 +74,7 @@ Source Location: /tcpdf.php

Version:

@@ -603,7 +603,7 @@ This is a PHP class for generating PDF documents without requiring external exte author:  Nicola Asuni - info@tecnick.com - version:  4.7.000 + version:  4.7.001 link:  http://www.tcpdf.org @@ -5581,7 +5581,7 @@ $diskcache = false])
-

method addExtGState [line 9887]

+

method addExtGState [line 9938]

@@ -5743,7 +5743,7 @@ $style = -1])
-

method addHTMLVertSpace [line 13046]

+

method addHTMLVertSpace [line 13097]

@@ -5954,7 +5954,7 @@ $k)
-

method addTOC [line 14068]

+

method addTOC [line 14119]

@@ -6008,7 +6008,7 @@ $filler = '.'])
-

method AliasNbPages [line 9695]

+

method AliasNbPages [line 9746]

@@ -6050,7 +6050,7 @@ $alias = '{nb}'])
-

method AliasNumPage [line 9722]

+

method AliasNumPage [line 9773]

@@ -6167,7 +6167,7 @@ $spaces = 0])
-

method Arrow [line 8607]

+

method Arrow [line 8634]

@@ -6188,7 +6188,7 @@ $arm_angle = 15])
- + @@ -6222,7 +6222,7 @@ $arm_angle = 15]) - + @@ -6320,7 +6320,7 @@ $setbom = true])
-

method Bookmark [line 9227]

+

method Bookmark [line 9278]

author:  Piotr Galecki, Nicola Asuniauthor:  Piotr Galecki, Nicola Asuni, Andy Meier
since:  4.6.018 (2009-07-10)
int   $head_style  (0 = draw only arrowhead arms, 1 = draw closed arrowhead, but no fill, 2 = closed and filled arrowhead)(0 = draw only arrowhead arms, 1 = draw closed arrowhead, but no fill, 2 = closed and filled arrowhead, 3 = filled arrowhead)
float  
@@ -6374,7 +6374,7 @@ $page = ''])
-

method Button [line 9509]

+

method Button [line 9560]

@@ -6536,7 +6536,7 @@ $ignore_min_height = false])
-

method CheckBox [line 9489]

+

method CheckBox [line 9540]

@@ -6644,7 +6644,7 @@ $addpage = true])
-

method Circle [line 8294]

+

method Circle [line 8297]

@@ -6743,7 +6743,7 @@ $afinish:)
-

method Clip [line 10150]

+

method Clip [line 10201]

@@ -6834,7 +6834,7 @@ $h)
-

method closeHTMLTagHandler [line 12715]

+

method closeHTMLTagHandler [line 12766]

@@ -6888,7 +6888,7 @@ $dom)
-

method ComboBox [line 9470]

+

method ComboBox [line 9521]

@@ -6948,7 +6948,7 @@ $prop = array()])
-

method commitTransaction [line 14225]

+

method commitTransaction [line 14276]

@@ -7015,7 +7015,7 @@ $color = '#FFFFFF'])
-

method CoonsPatchMesh [line 10070]

+

method CoonsPatchMesh [line 10121]

@@ -7117,7 +7117,7 @@ $coords_max = 1])
-

method Curve [line 8069]

+

method Curve [line 8072]

@@ -7219,7 +7219,7 @@ $fill_color = array()])
-

method deletePage [line 13928]

+

method deletePage [line 13979]

@@ -7261,7 +7261,7 @@ $page)
-

method Ellipse [line 8190]

+

method Ellipse [line 8193]

@@ -7378,7 +7378,7 @@ $afinish:)
-

method empty_string [line 14272]

+

method empty_string [line 14323]

@@ -7515,7 +7515,7 @@ $msg)
-

method formatPageNumber [line 9799]

+

method formatPageNumber [line 9850]

@@ -7554,7 +7554,7 @@ $num)
-

method formatTOCPageNumber [line 9811]

+

method formatTOCPageNumber [line 9862]

@@ -7627,7 +7627,7 @@ $num)
-

method getAliasNbPages [line 9707]

+

method getAliasNbPages [line 9758]

@@ -7658,7 +7658,7 @@ $num)
-

method getAliasNumPage [line 9735]

+

method getAliasNumPage [line 9786]

@@ -7752,7 +7752,7 @@ $fontsize = 0])
-

method getBarcode [line 10615]

+

method getBarcode [line 10666]

@@ -7876,7 +7876,7 @@ $pagenum = ''])
-

method getBuffer [line 13614]

+

method getBuffer [line 13665]

@@ -8003,7 +8003,7 @@ $ignore_min_height = false])
-

method getCellHeightRatio [line 9973]

+

method getCellHeightRatio [line 10024]

@@ -8073,7 +8073,7 @@ $char)
-

method getFontBuffer [line 13774]

+

method getFontBuffer [line 13825]

@@ -8115,7 +8115,7 @@ $font)
-

method getFontFamily [line 11089]

+

method getFontFamily [line 11140]

@@ -8146,7 +8146,7 @@ $font)
-

method getFontSize [line 11069]

+

method getFontSize [line 11120]

@@ -8177,7 +8177,7 @@ $font)
-

method getFontSizePt [line 11079]

+

method getFontSizePt [line 11130]

@@ -8236,7 +8236,7 @@ $font)
-

method getFontStyle [line 11099]

+

method getFontStyle [line 11150]

@@ -8362,7 +8362,7 @@ $v)
-

method getGraphicVars [line 13482]

+

method getGraphicVars [line 13533]

@@ -8393,7 +8393,7 @@ $v)
-

method getGroupPageNo [line 9748]

+

method getGroupPageNo [line 9799]

@@ -8418,7 +8418,7 @@ $v)
-

method getGroupPageNoFormatted [line 9758]

+

method getGroupPageNoFormatted [line 9809]

@@ -8533,7 +8533,7 @@ $v)
-

method getHtmlDomArray [line 11135]

+

method getHtmlDomArray [line 11186]

@@ -8572,7 +8572,7 @@ $html)
-

method getHTMLUnitToUnits [line 13201]

+

method getHTMLUnitToUnits [line 13252]

@@ -8638,7 +8638,7 @@ $point)
-

method getImageBuffer [line 13716]

+

method getImageBuffer [line 13767]

@@ -8829,7 +8829,7 @@ $image)
-

method getMargins [line 11032]

+

method getMargins [line 11083]

@@ -8984,7 +8984,7 @@ $w = 0])
-

method getObjFilename [line 13546]

+

method getObjFilename [line 13597]

@@ -9029,7 +9029,7 @@ $prefix)
-

method getOriginalMargins [line 11055]

+

method getOriginalMargins [line 11106]

@@ -9094,7 +9094,7 @@ $prefix)
-

method getPageBuffer [line 13657]

+

method getPageBuffer [line 13708]

@@ -9181,7 +9181,7 @@ $pagenum = ''])
-

method getPageGroupAlias [line 9770]

+

method getPageGroupAlias [line 9821]

@@ -9254,7 +9254,7 @@ $pagenum = ''])
-

method getPageNumGroupAlias [line 9785]

+

method getPageNumGroupAlias [line 9836]

@@ -9598,7 +9598,7 @@ $fontsize = 0])
-

method Gradient [line 10173]

+

method Gradient [line 10224]

@@ -9809,7 +9809,7 @@ $fitbox = false])
-

method ImageEps [line 10345]

+

method ImageEps [line 10396]

@@ -10010,7 +10010,7 @@ $palign = ''])
-

method IncludeJS [line 9319]

+

method IncludeJS [line 9370]

@@ -10046,7 +10046,7 @@ $script)
-

method intToRoman [line 13275]

+

method intToRoman [line 13326]

@@ -10130,7 +10130,7 @@ $resetmargins = false])
-

method Line [line 7936]

+

method Line [line 7939]

@@ -10196,7 +10196,7 @@ $style = array()])
-

method LinearGradient [line 10030]

+

method LinearGradient [line 10081]

@@ -10346,7 +10346,7 @@ $spaces = 0])
-

method ListBox [line 9447]

+

method ListBox [line 9498]

@@ -10640,7 +10640,7 @@ $y = ''])
-

method movePage [line 13791]

+

method movePage [line 13842]

@@ -10814,7 +10814,7 @@ $maxh = 0])
-

method objclone [line 14261]

+

method objclone [line 14312]

@@ -10887,7 +10887,7 @@ $object)
-

method openHTMLTagHandler [line 12385]

+

method openHTMLTagHandler [line 12436]

@@ -11023,7 +11023,7 @@ $dest = 'I'])
-

method PageNoFormatted [line 9821]

+

method PageNoFormatted [line 9872]

@@ -11054,7 +11054,7 @@ $dest = 'I'])
-

method PieSector [line 10267]

+

method PieSector [line 10318]

@@ -11198,7 +11198,7 @@ $px)
-

method Polycurve [line 8126]

+

method Polycurve [line 8129]

@@ -11270,7 +11270,7 @@ $fill_color = array()])
-

method Polygon [line 8319]

+

method Polygon [line 8322]

@@ -11327,7 +11327,7 @@ $fill_color = array()])
-

method putHtmlListBullet [line 13340]

+

method putHtmlListBullet [line 13391]

@@ -11378,7 +11378,7 @@ $size = 10])
-

method RadialGradient [line 10048]

+

method RadialGradient [line 10099]

@@ -11456,7 +11456,7 @@ $coords = array(0.5,0.5,0.5,0.5,1)])
-

method RadioButton [line 9429]

+

method RadioButton [line 9480]

@@ -11504,7 +11504,7 @@ $prop = array()])
-

method readDiskCache [line 13586]

+

method readDiskCache [line 13637]

@@ -11552,7 +11552,7 @@ $file)
-

method Rect [line 7971]

+

method Rect [line 7974]

@@ -11630,7 +11630,7 @@ $fill_color = array()])
-

method RegularPolygon [line 8418]

+

method RegularPolygon [line 8445]

@@ -11834,7 +11834,7 @@ $length)
-

method rollbackTransaction [line 14238]

+

method rollbackTransaction [line 14289]

@@ -11919,7 +11919,7 @@ $y = ''])
-

method RoundedRect [line 8522]

+

method RoundedRect [line 8549]

@@ -12228,7 +12228,7 @@ $y = ''])
-

method setAlpha [line 9930]

+

method setAlpha [line 9981]

@@ -12360,7 +12360,7 @@ $margin = 0])
-

method setBarcode [line 10605]

+

method setBarcode [line 10656]

@@ -12396,7 +12396,7 @@ $bc = ''])
-

method SetBooklet [line 13115]

+

method SetBooklet [line 13166]

@@ -12447,7 +12447,7 @@ $outer = -1])
-

method setBuffer [line 13596]

+

method setBuffer [line 13647]

@@ -12486,7 +12486,7 @@ $data)
-

method setCellHeightRatio [line 9964]

+

method setCellHeightRatio [line 10015]

@@ -12723,7 +12723,7 @@ $font)
-

method setDefaultTableColumns [line 9954]

+

method setDefaultTableColumns [line 10005]

@@ -12960,7 +12960,7 @@ $tint = 100])
-

method setExtGState [line 9899]

+

method setExtGState [line 9950]

@@ -13206,7 +13206,7 @@ $fontfile = ''])
-

method setFontBuffer [line 13732]

+

method setFontBuffer [line 13783]

@@ -13293,7 +13293,7 @@ $size)
-

method setFontSubBuffer [line 13754]

+

method setFontSubBuffer [line 13805]

@@ -13447,7 +13447,7 @@ $fm = 10])
-

method setGraphicVars [line 13513]

+

method setGraphicVars [line 13564]

@@ -13643,7 +13643,7 @@ $hm = 10])
-

method setHtmlLinksStyle [line 13186]

+

method setHtmlLinksStyle [line 13237]

@@ -13688,7 +13688,7 @@ $fontstyle = 'U'])
-

method setHtmlVSpace [line 13155]

+

method setHtmlVSpace [line 13206]

@@ -13727,7 +13727,7 @@ $tagvs)
-

method setImageBuffer [line 13673]

+

method setImageBuffer [line 13724]

@@ -13814,7 +13814,7 @@ $scale)
-

method setImageSubBuffer [line 13696]

+

method setImageSubBuffer [line 13747]

@@ -13865,7 +13865,7 @@ $data)
-

method setJPEGQuality [line 9941]

+

method setJPEGQuality [line 9992]

@@ -14208,7 +14208,7 @@ $page = -1])
-

method setListIndentWidth [line 13165]

+

method setListIndentWidth [line 13216]

@@ -14247,7 +14247,7 @@ $width)
-

method setLIsymbol [line 13075]

+

method setLIsymbol [line 13126]

@@ -14340,7 +14340,7 @@ $right = -1])
-

method setOpenCell [line 13175]

+

method setOpenCell [line 13226]

@@ -14427,7 +14427,7 @@ $resetmargins = false])
-

method setPageBuffer [line 13630]

+

method setPageBuffer [line 13681]

@@ -14641,7 +14641,7 @@ $unit)
-

method setPDFVersion [line 9983]

+

method setPDFVersion [line 10034]

@@ -14896,7 +14896,7 @@ $resetx = true])
-

method setSignature [line 9653]

+

method setSignature [line 9704]

@@ -15344,7 +15344,7 @@ $margin)
-

method setUserRights [line 9627]

+

method setUserRights [line 9678]

@@ -15404,7 +15404,7 @@ $signature = '/Modify'])
-

method setViewerPreferences [line 10013]

+

method setViewerPreferences [line 10064]

@@ -15440,7 +15440,7 @@ $preferences)
-

method setVisibility [line 9851]

+

method setVisibility [line 9902]

@@ -15821,7 +15821,7 @@ $y = ''])
-

method StarPolygon [line 8473]

+

method StarPolygon [line 8500]

@@ -15993,7 +15993,7 @@ $format = ''])
-

method startPageGroup [line 9680]

+

method startPageGroup [line 9731]

@@ -16029,7 +16029,7 @@ $page = ''])
-

method startTransaction [line 14211]

+

method startTransaction [line 14262]

@@ -16119,7 +16119,7 @@ $page = ''])
-

method swapMargins [line 13131]

+

method swapMargins [line 13182]

@@ -16227,7 +16227,7 @@ $clip = false])
-

method TextField [line 9416]

+

method TextField [line 9467]

@@ -16686,7 +16686,7 @@ $end = ''])
-

method utf8Bidi [line 8656]

+

method utf8Bidi [line 8707]

@@ -16806,7 +16806,7 @@ $str)
-

method utf8StrRev [line 8642]

+

method utf8StrRev [line 8693]

@@ -17049,7 +17049,7 @@ $maxh = 0])
-

method write1DBarcode [line 10634]

+

method write1DBarcode [line 10685]

@@ -17139,7 +17139,7 @@ $align = ''])
-

method write2DBarcode [line 10885]

+

method write2DBarcode [line 10936]

@@ -17223,7 +17223,7 @@ $align = ''])
-

method writeBarcode [line 10835]

+

method writeBarcode [line 10886]

@@ -17313,7 +17313,7 @@ $code)
-

method writeDiskCache [line 13558]

+

method writeDiskCache [line 13609]

@@ -17370,7 +17370,7 @@ $file)
-

method writeHTML [line 11535]

+

method writeHTML [line 11586]

@@ -17436,7 +17436,7 @@ $align = ''])
-

method writeHTMLCell [line 11123]

+

method writeHTMLCell [line 11174]

@@ -17538,7 +17538,7 @@ $autopadding = true])
-

method _addfield [line 9381]

+

method _addfield [line 9432]

@@ -18134,7 +18134,7 @@ $protection)
-

method _JScolor [line 9357]

+

method _JScolor [line 9408]

@@ -18318,7 +18318,7 @@ $s)
-

method _outarc [line 10247]

+

method _outarc [line 10298]

@@ -18390,7 +18390,7 @@ $y3)
-

method _outCurve [line 7916]

+

method _outCurve [line 7919]

@@ -18456,7 +18456,7 @@ $y3)
-

method _outLine [line 7880]

+

method _outLine [line 7883]

@@ -18498,7 +18498,7 @@ $y)
-

method _outPoint [line 7866]

+

method _outPoint [line 7869]

@@ -18540,7 +18540,7 @@ $y)
-

method _outRect [line 7897]

+

method _outRect [line 7900]

@@ -18805,7 +18805,7 @@ $n)
-

method _putbookmarks [line 9255]

+

method _putbookmarks [line 9306]

diff --git a/examples/example_012.php b/examples/example_012.php index 7e209ba..52fdd1e 100755 --- a/examples/example_012.php +++ b/examples/example_012.php @@ -2,7 +2,7 @@ //============================================================+ // File name : example_012.php // Begin : 2008-03-04 -// Last Update : 2009-07-10 +// Last Update : 2009-08-30 // // Description : Example 012 for TCPDF class // Graphic Functions @@ -77,9 +77,9 @@ $style4 = array('L' => 0, 'T' => array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => '20,10', 'phase' => 10, 'color' => array(100, 100, 255)), 'R' => array('width' => 0.50, 'cap' => 'round', 'join' => 'miter', 'dash' => 0, 'color' => array(50, 50, 127)), 'B' => array('width' => 0.75, 'cap' => 'square', 'join' => 'miter', 'dash' => '30,10,5,10')); -$style5 = array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)); -$style6 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,10', 'color' => array(0, 255, 0)); -$style7 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(200, 200, 0)); +$style5 = array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 64, 128)); +$style6 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,10', 'color' => array(0, 128, 0)); +$style7 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 128, 0)); // Line $pdf->Text(5, 7, 'Line examples'); @@ -129,7 +129,7 @@ $pdf->Text(5, 172, 'Regular polygon examples'); $pdf->SetLineStyle($style5); $pdf->RegularPolygon(20, 190, 15, 6, 0, 1, 'F'); $pdf->RegularPolygon(55, 190, 15, 6); -$pdf->RegularPolygon(55, 190, 10, 6, 45, 0, 'DF', array($style6, 0, $style7, 0, $style7, $style7, $style6)); +$pdf->RegularPolygon(55, 190, 10, 6, 45, 0, 'DF', array($style6, 0, $style7, 0, $style7, $style7)); $pdf->RegularPolygon(90, 190, 15, 3, 0, 1, 'DF', array('all' => $style5), array(200, 220, 200), 'F', array(255, 200, 200)); $pdf->RegularPolygon(125, 190, 15, 4, 30, 1, null, array('all' => $style5), null, null, $style6); $pdf->RegularPolygon(160, 190, 15, 10); @@ -138,8 +138,8 @@ $pdf->RegularPolygon(160, 190, 15, 10); $pdf->Text(5, 212, 'Star polygon examples'); $pdf->SetLineStyle($style5); $pdf->StarPolygon(20, 230, 15, 20, 3, 0, 1, 'F'); -$pdf->StarPolygon(55, 230, 15, 12, 5); -$pdf->StarPolygon(55, 230, 7, 12, 5, 45, 0, 'DF', array($style6, 0, $style7, 0, $style7, $style7, $style6)); +$pdf->StarPolygon(55, 230, 15, 12, 5); +$pdf->StarPolygon(55, 230, 7, 12, 5, 45, 0, 'DF', array('all' => $style7), array(220, 220, 200), 'F', array(255, 200, 200)); $pdf->StarPolygon(90, 230, 15, 20, 6, 0, 1, 'DF', array('all' => $style5), array(220, 220, 200), 'F', array(255, 200, 200)); $pdf->StarPolygon(125, 230, 15, 5, 2, 30, 1, null, array('all' => $style5), null, null, $style6); $pdf->StarPolygon(160, 230, 15, 10, 3); @@ -156,9 +156,11 @@ $pdf->RoundedRect(140, 255, 40, 30, 8.0, '0101', 'DF', $style6, array(200, 200, // Arrows $pdf->Text(190, 252, 'Arrows'); $pdf->SetLineStyle($style5); -$pdf->Arrow($x0=200, $y0=280, $x1=190, $y1=260, $head_style=0, $arm_size=5, $arm_angle=15); -$pdf->Arrow($x0=200, $y0=280, $x1=195, $y1=260, $head_style=1, $arm_size=5, $arm_angle=15); -$pdf->Arrow($x0=200, $y0=280, $x1=200, $y1=260, $head_style=2, $arm_size=5, $arm_angle=15); +$pdf->SetFillColor(255, 0, 0); +$pdf->Arrow($x0=200, $y0=280, $x1=185, $y1=266, $head_style=0, $arm_size=5, $arm_angle=15); +$pdf->Arrow($x0=200, $y0=280, $x1=190, $y1=263, $head_style=1, $arm_size=5, $arm_angle=15); +$pdf->Arrow($x0=200, $y0=280, $x1=195, $y1=261, $head_style=2, $arm_size=5, $arm_angle=15); +$pdf->Arrow($x0=200, $y0=280, $x1=200, $y1=260, $head_style=3, $arm_size=5, $arm_angle=15); // --------------------------------------------------------- diff --git a/tcpdf.php b/tcpdf.php index 94fef3a..c985f04 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -2,9 +2,9 @@ //============================================================+ // File name : tcpdf.php // Begin : 2002-08-03 -// Last Update : 2009-08-29 +// Last Update : 2009-08-30 // Author : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org -// Version : 4.7.000 +// Version : 4.7.001 // 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.7.000 + * @version 4.7.001 */ /** @@ -152,14 +152,14 @@ if (!class_exists('TCPDF', false)) { /** * define default PDF document producer */ - define('PDF_PRODUCER', 'TCPDF 4.7.000 (http://www.tcpdf.org)'); + define('PDF_PRODUCER', 'TCPDF 4.7.001 (http://www.tcpdf.org)'); /** * This is a PHP class for generating PDF documents without requiring external extensions.
* 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.
* @name TCPDF * @package com.tecnick.tcpdf - * @version 4.7.000 + * @version 4.7.001 * @author Nicola Asuni - info@tecnick.com * @link http://www.tcpdf.org * @license http://www.gnu.org/copyleft/lesser.html LGPL @@ -1352,7 +1352,7 @@ if (!class_exists('TCPDF', false)) { * @since 4.7.000 (2009-08-29) */ protected $annot_obj_id = 200000; - + //------------------------------------------------------------ // METHODS //------------------------------------------------------------ @@ -5474,7 +5474,7 @@ if (!class_exists('TCPDF', false)) { $this->_out($this->annot_obj_id.' 0 R'); } } - if ($this->sign AND isset($this->signature_data['cert_type']) AND ($this->signature_data['cert_type'] > 0)) { + if (($n==1) AND $this->sign AND isset($this->signature_data['cert_type']) AND ($this->signature_data['cert_type'] > 0)) { // set reference for signature object $this->_out($this->sig_annot_ref); } @@ -7809,6 +7809,9 @@ if (!class_exists('TCPDF', false)) { * @since 2.1.000 (2008-01-08) */ public function SetLineStyle($style) { + if (!is_array($style)) { + return; + } extract($style); if (isset($width)) { $width_prev = $this->LineWidth; @@ -7934,7 +7937,7 @@ if (!class_exists('TCPDF', false)) { * @see SetLineWidth(), SetDrawColor(), SetLineStyle() */ public function Line($x1, $y1, $x2, $y2, $style=array()) { - if ($style) { + if (is_array($style)) { $this->SetLineStyle($style); } $this->_outPoint($x1, $y1); @@ -8317,7 +8320,17 @@ if (!class_exists('TCPDF', false)) { * @since 2.1.000 (2008-01-08) */ public function Polygon($p, $style='', $line_style=array(), $fill_color=array()) { - $np = count($p) / 2; + $nc = count($p); // number of coordinates + $np = $nc / 2; // number of points + for ($i = 0; $i < 4; ++$i) { + // close polygon by adding the first 2 points at the end (one line) + $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; if (!(false === strpos($style, 'F')) AND isset($fill_color)) { $this->SetFillColorArray($fill_color); } @@ -8349,32 +8362,46 @@ if (!class_exists('TCPDF', false)) { if ($line_style) { if (isset($line_style['all'])) { $this->SetLineStyle($line_style['all']); - } else { // 0 .. (np - 1), op = {B, S} + } else { $draw = false; - if ('B' == $op) { + if ($op == 'B') { + // draw fill $op = 'f'; $this->_outPoint($p[0], $p[1]); - for ($i = 2; $i < ($np * 2); $i = $i + 2) { + for ($i = 2; $i < $nc; $i = $i + 2) { $this->_outLine($p[$i], $p[$i + 1]); } - $this->_outLine($p[0], $p[1]); $this->_out($op); } - $p[($np * 2)] = $p[0]; - $p[(($np * 2) + 1)] = $p[1]; - for ($i = 0; $i < $np; ++$i) { - if (isset($line_style[$i]) AND ($line_style[$i] != 0)) { - $this->Line($p[($i * 2)], $p[(($i * 2) + 1)], $p[(($i * 2) + 2)], $p[(($i * 2) + 3)], $line_style[$i]); + // draw outline + $this->_outPoint($p[0], $p[1]); + for ($i = 2; $i < $nc; $i = $i + 2) { + $line_num = ($i / 2) - 1; + if (isset($line_style[$line_num])) { + if ($line_style[$line_num] != 0) { + if (is_array($line_style[$line_num])) { + $this->_out('S'); + $this->SetLineStyle($line_style[$line_num]); + $this->_outPoint($p[$i - 2], $p[$i - 1]); + $this->_outLine($p[$i], $p[$i + 1]); + $this->_out('S'); + $this->_outPoint($p[$i], $p[$i + 1]); + } else { + $this->_outLine($p[$i], $p[$i + 1]); + } + } + } else { + $this->_outLine($p[$i], $p[$i + 1]); } } + $this->_out($op); } } if ($draw) { $this->_outPoint($p[0], $p[1]); - for ($i = 2; $i < ($np * 2); $i = $i + 2) { + for ($i = 2; $i < $nc; $i = $i + 2) { $this->_outLine($p[$i], $p[$i + 1]); } - $this->_outLine($p[0], $p[1]); $this->_out($op); } } @@ -8471,7 +8498,7 @@ if (!class_exists('TCPDF', false)) { * @since 2.1.000 (2008-01-08) */ public function StarPolygon($x0, $y0, $r, $nv, $ng, $angle=0, $draw_circle=false, $style='', $line_style=array(), $fill_color=array(), $circle_style='', $circle_outLine_style=array(), $circle_fill_color=array()) { - if (2 > $nv) { + if ($nv < 2) { $nv = 2; } if ($draw_circle) { @@ -8598,34 +8625,58 @@ if (!class_exists('TCPDF', false)) { * @parameter float $y0 Ordinate of first point. * @parameter float $x0 Abscissa of second point. * @parameter float $y1 Ordinate of second point. - * @parameter int $head_style (0 = draw only arrowhead arms, 1 = draw closed arrowhead, but no fill, 2 = closed and filled arrowhead) + * @parameter int $head_style (0 = draw only arrowhead arms, 1 = draw closed arrowhead, but no fill, 2 = closed and filled arrowhead, 3 = filled arrowhead) * @parameter float $arm_size length of arrowhead arms * @parameter int $arm_angle angle between an arm and the shaft - * @author Piotr Galecki, Nicola Asuni + * @author Piotr Galecki, Nicola Asuni, Andy Meier * @since 4.6.018 (2009-07-10) */ public function Arrow($x0, $y0, $x1, $y1, $head_style=0, $arm_size=5, $arm_angle=15) { - //main arrow line / shaft - $this->Line($x0, $y0, $x1, $y1); - //getting arrow direction angle + // getting arrow direction angle + // 0 deg angle is when both arms go along X axis. angle grows clockwise. $dir_angle = rad2deg(atan2(($y0 - $y1), ($x0 - $x1))); - //0 angle is when both arms go along X axis. angle grows clockwise. - //left arrowhead arm tip + $sx1 = $x1; + $sy1 = $y1; + if ($head_style > 0) { + // calculate the stopping point for the arrow shaft + $sx1 = $x1 + (($arm_size - $this->LineWidth) * cos(deg2rad($dir_angle))); + $sy1 = $y1 + (($arm_size - $this->LineWidth) * sin(deg2rad($dir_angle))); + } + // main arrow line / shaft + $this->Line($x0, $y0, $sx1, $sy1); + // left arrowhead arm tip $x2L = $x1 + ($arm_size * cos(deg2rad($dir_angle + $arm_angle))); $y2L = $y1 + ($arm_size * sin(deg2rad($dir_angle + $arm_angle))); - //right arrowhead arm tip + // right arrowhead arm tip $x2R = $x1 + ($arm_size * cos(deg2rad($dir_angle - $arm_angle))); $y2R = $y1 + ($arm_size * sin(deg2rad($dir_angle - $arm_angle))); - if($head_style > 0) { - //closed arrowhead - $this->Polygon(array($x1, $y1, $x2L, $y2L, $x2R, $y2R), (($head_style === 1) ? 'D' : 'DF'), array(), array()); - } else { //just arms - //left arm - $this->Line($x1, $y1, $x2L, $y2L); - //right arm - $this->Line($x1, $y1, $x2R, $y2R); + $mode = 'D'; + $style = array(); + switch ($head_style) { + case 0: { + // draw only arrowhead arms + $mode = 'D'; + $style = array(1, 1, 0); + break; + } + case 1: { + // draw closed arrowhead, but no fill + $mode = 'D'; + break; + } + case 2: { + // closed and filled arrowhead + $mode = 'DF'; + break; + } + case 3: { + // filled arrowhead + $mode = 'F'; + break; + } } - } + $this->Polygon(array($x2L, $y2L, $x1, $y1, $x2R, $y2R), $mode, $style, array()); + } // END GRAPHIC FUNCTIONS SECTION -----------------------
diff --git a/doc/li_com-tecnick-tcpdf.html b/doc/li_com-tecnick-tcpdf.html index 2bf1de3..64126fa 100644 --- a/doc/li_com-tecnick-tcpdf.html +++ b/doc/li_com-tecnick-tcpdf.html @@ -58,7 +58,7 @@ This documentation was generated by phpDocumentor v1.4.1

- Documentation generated on Sat, 29 Aug 2009 18:09:07 +0200 by phpDocumentor 1.4.1 + Documentation generated on Sun, 30 Aug 2009 10:53:24 +0200 by phpDocumentor 1.4.1
@@ -18956,7 +18956,7 @@ $font)
-

method _putextgstates [line 9909]

+

method _putextgstates [line 9960]

diff --git a/doc/index.html b/doc/index.html index 2bf1de3..64126fa 100644 --- a/doc/index.html +++ b/doc/index.html @@ -58,7 +58,7 @@ This documentation was generated by phpDocumentor v1.4.1

- Documentation generated on Sat, 29 Aug 2009 18:09:07 +0200 by phpDocumentor 1.4.1 + Documentation generated on Sun, 30 Aug 2009 10:53:24 +0200 by phpDocumentor 1.4.1
diff --git a/doc/errors.html b/doc/errors.html index 60273ae..3422d9e 100644 --- a/doc/errors.html +++ b/doc/errors.html @@ -35,7 +35,7 @@ Post-parsing

- Documentation generated on Sat, 29 Aug 2009 18:09:13 +0200 by phpDocumentor 1.4.1 + Documentation generated on Sun, 30 Aug 2009 10:53:30 +0200 by phpDocumentor 1.4.1
@@ -19129,7 +19129,7 @@ $cidoffset = 0])
-

method _putjavascript [line 9329]

+

method _putjavascript [line 9380]

diff --git a/doc/elementindex_com-tecnick-tcpdf.html b/doc/elementindex_com-tecnick-tcpdf.html index 4039757..f475061 100644 --- a/doc/elementindex_com-tecnick-tcpdf.html +++ b/doc/elementindex_com-tecnick-tcpdf.html @@ -1417,7 +1417,7 @@ top

- Documentation generated on Sat, 29 Aug 2009 18:09:07 +0200 by phpDocumentor 1.4.1 + Documentation generated on Sun, 30 Aug 2009 10:53:24 +0200 by phpDocumentor 1.4.1
diff --git a/doc/elementindex.html b/doc/elementindex.html index 40650cf..81c967c 100644 --- a/doc/elementindex.html +++ b/doc/elementindex.html @@ -1394,7 +1394,7 @@ top

- Documentation generated on Sat, 29 Aug 2009 18:09:07 +0200 by phpDocumentor 1.4.1 + Documentation generated on Sun, 30 Aug 2009 10:53:24 +0200 by phpDocumentor 1.4.1
@@ -19154,7 +19154,7 @@ $cidoffset = 0])
-

method _putocg [line 9830]

+

method _putocg [line 9881]

diff --git a/doc/com-tecnick-tcpdf/_unicode_data.php.html b/doc/com-tecnick-tcpdf/_unicode_data.php.html index c3f35a0..40c4b0f 100644 --- a/doc/com-tecnick-tcpdf/_unicode_data.php.html +++ b/doc/com-tecnick-tcpdf/_unicode_data.php.html @@ -237,7 +237,7 @@ Unicode Include file for TCPDF.




- Documentation generated on Sat, 29 Aug 2009 18:09:13 +0200 by phpDocumentor 1.4.1 + Documentation generated on Sun, 30 Aug 2009 10:53:30 +0200 by phpDocumentor 1.4.1
@@ -19254,7 +19254,7 @@ $cidoffset = 0])
-

method _putshaders [line 10197]

+

method _putshaders [line 10248]

diff --git a/doc/com-tecnick-tcpdf/_tcpdf.php.html b/doc/com-tecnick-tcpdf/_tcpdf.php.html index 648a62e..cc93ce8 100644 --- a/doc/com-tecnick-tcpdf/_tcpdf.php.html +++ b/doc/com-tecnick-tcpdf/_tcpdf.php.html @@ -73,7 +73,7 @@ This is a PHP class for generating PDF documents without requiring external exte - + @@ -104,7 +104,7 @@ unicode data

diff --git a/doc/com-tecnick-tcpdf/_htmlcolors.php.html b/doc/com-tecnick-tcpdf/_htmlcolors.php.html index c7a0147..1589e91 100644 --- a/doc/com-tecnick-tcpdf/_htmlcolors.php.html +++ b/doc/com-tecnick-tcpdf/_htmlcolors.php.html @@ -88,7 +88,7 @@ Array of WEB safe colors.




- Documentation generated on Sat, 29 Aug 2009 18:09:08 +0200 by phpDocumentor 1.4.1 + Documentation generated on Sun, 30 Aug 2009 10:53:25 +0200 by phpDocumentor 1.4.1
@@ -19285,7 +19285,7 @@ $cidoffset = 0])
-

method _putsignature [line 9576]

+

method _putsignature [line 9627]

diff --git a/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html b/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html index f5356b3..1a40e58 100644 --- a/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html +++ b/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html @@ -507,7 +507,7 @@ Configuration file for TCPDF.




- Documentation generated on Sat, 29 Aug 2009 18:09:13 +0200 by phpDocumentor 1.4.1 + Documentation generated on Sun, 30 Aug 2009 10:53:30 +0200 by phpDocumentor 1.4.1
diff --git a/doc/com-tecnick-tcpdf/_barcodes.php.html b/doc/com-tecnick-tcpdf/_barcodes.php.html index 8163b89..53b3d28 100644 --- a/doc/com-tecnick-tcpdf/_barcodes.php.html +++ b/doc/com-tecnick-tcpdf/_barcodes.php.html @@ -96,7 +96,7 @@ PHP class to creates array representations for common 1D barcodes to be used wit

- Documentation generated on Sat, 29 Aug 2009 18:09:07 +0200 by phpDocumentor 1.4.1 + Documentation generated on Sun, 30 Aug 2009 10:53:24 +0200 by phpDocumentor 1.4.1
@@ -19441,7 +19441,7 @@ $font)
-

method _putursignature [line 9532]

+

method _putursignature [line 9583]

diff --git a/doc/com-tecnick-tcpdf/TCPDFBarcode.html b/doc/com-tecnick-tcpdf/TCPDFBarcode.html index 8f51cd8..dd51eca 100644 --- a/doc/com-tecnick-tcpdf/TCPDFBarcode.html +++ b/doc/com-tecnick-tcpdf/TCPDFBarcode.html @@ -1368,7 +1368,7 @@ $type)

- Documentation generated on Sat, 29 Aug 2009 18:09:07 +0200 by phpDocumentor 1.4.1 + Documentation generated on Sun, 30 Aug 2009 10:53:24 +0200 by phpDocumentor 1.4.1
@@ -19691,7 +19691,7 @@ $file)

- Documentation generated on Sat, 29 Aug 2009 18:09:08 +0200 by phpDocumentor 1.4.1 + Documentation generated on Sun, 30 Aug 2009 10:53:25 +0200 by phpDocumentor 1.4.1
author:  Nicola Asuni
version:  4.7.000version:  4.7.001
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
- PDF_PRODUCER = 'TCPDF 4.7.000 (http://www.tcpdf.org)' + PDF_PRODUCER = 'TCPDF 4.7.001 (http://www.tcpdf.org)'
@@ -115,7 +115,7 @@ unicode data


- Documentation generated on Sat, 29 Aug 2009 18:09:08 +0200 by phpDocumentor 1.4.1 + Documentation generated on Sun, 30 Aug 2009 10:53:25 +0200 by phpDocumentor 1.4.1