cvs: pear /Image_Canvas/Canvas SVG.php /Image_Canvas/docs ChangeLog

From: Date: Wed, 17 Aug 2005 18:28:21 +0000
Subject: cvs: pear /Image_Canvas/Canvas SVG.php /Image_Canvas/docs ChangeLog
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-34073@lists.php.net to get a copy of this message
nosey Wed Aug 17 14:28:21 2005 EDT Modified files: /pear/Image_Canvas/docs ChangeLog /pear/Image_Canvas/Canvas SVG.php Log: Fixed but in Image_Canvas_SVG::polygon() not showing polygon if last point was a spline - addSpline() http://cvs.php.net/diff.php/pear/Image_Canvas/docs/ChangeLog?r1=1.7&r2=1.8&ty=u Index: pear/Image_Canvas/docs/ChangeLog diff -u pear/Image_Canvas/docs/ChangeLog:1.7 pear/Image_Canvas/docs/ChangeLog:1.8 --- pear/Image_Canvas/docs/ChangeLog:1.7 Wed Aug 17 13:59:07 2005 +++ pear/Image_Canvas/docs/ChangeLog Wed Aug 17 14:28:18 2005 @@ -8,6 +8,7 @@ * Fixed bug where 'htmltags' were not transferred to image mapping of polygon vertices * Fixed bug in SVG where pie slices with some specific angles curled the wrong way * Fixed bug in Image_Canvas_ImageMap::show() and Image_Canvas_ImageMap::save() calling non-existing method _toHtml() + * Fixed but in Image_Canvas_SVG::polygon() not showing polygon if last point was a spline - addSpline() Version 0.2.1 [2005-Aug-08] - Jesper Veggerby <pear.nosey@veggerby.dk> * Added Request #4997 "HTML attributes and JS actions in imagemaps" - using 'htmltags' entry http://cvs.php.net/diff.php/pear/Image_Canvas/Canvas/SVG.php?r1=1.4&r2=1.5&ty=u Index: pear/Image_Canvas/Canvas/SVG.php diff -u pear/Image_Canvas/Canvas/SVG.php:1.4 pear/Image_Canvas/Canvas/SVG.php:1.5 --- pear/Image_Canvas/Canvas/SVG.php:1.4 Tue Aug 16 17:27:58 2005 +++ pear/Image_Canvas/Canvas/SVG.php Wed Aug 17 14:28:21 2005 @@ -21,7 +21,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: SVG.php,v 1.4 2005/08/16 21:27:58 nosey Exp $ + * @version CVS: $Id: SVG.php,v 1.5 2005/08/17 18:28:21 nosey Exp $ * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 */ @@ -449,12 +449,18 @@ $first = true; $spline = false; + $lastpoint = false; foreach($this->_polygon as $point) { if ($first) { $points = 'M'; } elseif (!$spline) { $points .= ' L'; } + + if (($spline) && ($lastpoint !== false)) { + $points .= ' ' .round($lastpoint['P1X']) . ',' . round($lastpoint['P1Y']) . ' ' . + round($lastpoint['P2X']) . ',' . round($lastpoint['P2Y']); + } $points .= ' ' . round($point['X']) . ',' . round($point['Y']); @@ -464,8 +470,7 @@ if (($first) || (!$spline)) { $points .= ' C'; } - $points .= ' ' .round($point['P1X']) . ',' . round($point['P1Y']) . ' ' . - round($point['P2X']) . ',' . round($point['P2Y']); + $lastpoint = $point; $spline = true; } else { $spline = false;

« previous php.pear.cvs (#34073) next »