cvs: pear /XML_Transformer_GTEXT GTEXT.php package.xml

From: Date: Tue, 09 Apr 2002 07:04:49 +0000
Subject: cvs: pear /XML_Transformer_GTEXT GTEXT.php package.xml
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3163@lists.php.net to get a copy of this message
sebastian Tue Apr 9 03:04:49 2002 EDT Added files: /pear/XML_Transformer_GTEXT GTEXT.php package.xml Log: Give Kristian and Ulf something to work on :-) Index: pear/XML_Transformer_GTEXT/GTEXT.php +++ pear/XML_Transformer_GTEXT/GTEXT.php <?php // // +----------------------------------------------------------------------+ // | PHP Version 4 | // +----------------------------------------------------------------------+ // | Copyright (c) 1997-2002 The PHP Group | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.02 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | // | available at through the world-wide-web at | // | http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // | Author: Sebastian Bergmann <sb@sebastian-bergmann.de> | // | Kristian Köhntopp <kris@koehntopp.de> | // | Ulf Wendel <ulf.wendel@phpdoc.de> | // +----------------------------------------------------------------------+ // // $Id: GTEXT.php,v 1.1 2002/04/09 07:04:49 sebastian Exp $ // require_once 'Cache/Graphics.php'; require_once 'Image/Color.php'; /** * ... * * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Kristian Köhntopp <kris@koehntopp.de> * Wendel <ulf.wendel@phpdoc.de> * @version $Revision: 1.1 $ * @access public */ class XML_Transformer_GTEXT { /** * Characters with descenders. * * ImageTTFBox() gives you the correct width of a text, * but not the correct height. It does not return the * body size but the size from the baseline to the * ascender. For correct vertical alignment of texts * that contain characters which have descenders * (font dependend) you must perform an extra test to * get the correct height. * * The string is used as a regular expression. * Make sure, that you escaped all special characters. * * @var string All characters with descenders in * the font you use. * Default should work with Arial. * @access public */ var $descenders = 'fgjpqßyGJYµ|´,;{}\[\]§_@€ƒ„¢µ¶çýÿþ¿Ç'; /** * String used to measure the size of descenders. * * buildImage() uses a dirty hack to measure the * size of descenders. It generates an image with * the descender sign and scans the image... * * @var string String used to draw a test image to * find the size of descenders. */ var $descender_string = 'gG'; /** * Graphics cache object used to create the images. * * @var object Cache_Graphics * @access private */ var $_cache; /** * Constructor. * * @access public */ function XML_Transformer_GTEXT() { $this->_cache = new Cache_Graphics(); } /** * Callback for 'startElement' event. * * @param string * @param array * @return string * @access public */ function startElement($element, $attributes) { switch ($element) { case 'gtext': { // ... } break; // ... } return ''; } /** * Callback for 'endElement' event. * * @param string * @param string * @return string * @access public */ function endElement($element, $cdata) { switch ($element) { case 'gtext': { // ... } break; // ... } return ''; } } ?> Index: pear/XML_Transformer_GTEXT/package.xml +++ pear/XML_Transformer_GTEXT/package.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "../package.dtd"> <package version="1.0"> <name>XML_Transformer_GTEXT</name> <summary>...</summary> <description> ... </description> <maintainers> <maintainer> <user>sebastian</user> <role>lead</role> <name>Sebastian Bergmann</name> <email>sb@sebastian-bergmann.de</email> </maintainer> <maintainer> <user>kk</user> <role>developer</role> <name>Kristian Köhntopp</name> <email>kris@koehntopp.de</email> </maintainer> <maintainer> <user>uw</user> <role>developer</role> <name>Ulf Wendel</name> <email>ulf.wendel@phpdoc.de</email> </maintainer> </maintainers> <release> <version>0.1</version> <state>stable</state> <date>2002-MM-DD</date> <notes> ... </notes> <filelist> <dir name="/" baseinstalldir="XML/Transformer"> <file role="php" name="GTEXT.php"/> </dir> </filelist> <deps> <dep type="pkg" rel="ge" version="1.2">Cache</dep> <dep type="pkg" rel="ge" version="0.3">Image_Color</dep> <dep type="pkg" rel="ge" version="1.0">XML_Transformer</dep> <dep type="ext" rel="has">gd</dep> </deps> </release> </package>

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