1<?php 2/** 3 * Package for building SVG graphics. 4 * 5 * Copyright 2002-2007 The Horde Project (http://www.horde.org/) 6 * 7 * @author Chuck Hagenbuch <chuck@horde.org> 8 * @package XML_SVG 9 * @license http://www.fsf.org/copyleft/lgpl.html 10 */ 11require_once 'XML/SVG/Element.php'; 12/** 13 * XML_SVG_Textpath 14 * 15 * @package XML_SVG 16 */ 17class XML_SVG_Textpath extends XML_SVG_Element 18{ 19 20 var $_text; 21 var $_x; 22 var $_y; 23 var $_dx; 24 var $_dy; 25 var $_rotate; 26 var $_textLength; 27 var $_lengthAdjust; 28 var $_charset; 29 30 function printElement($element = 'textpath') 31 { 32 echo '<' . $element; 33 $this->printParams('id', 'x', 'y', 'dx', 'dy', 'rotate', 34 'textLength', 'lengthAdjust', 'style', 'transform'); 35 echo '>'; 36 if (isset($this->_charset)) { 37 echo @htmlspecialchars($this->_text, ENT_COMPAT, $this->_charset); 38 } else { 39 echo htmlspecialchars($this->_text); 40 } 41 parent::printElement(); 42 echo "</$element>\n"; 43 } 44 45 function setShape($x, $y, $text) 46 { 47 $this->_x = $x; 48 $this->_y = $y; 49 $this->_text = $text; 50 } 51 52} 53