[Comoblog-commit] comoblog/include/pear/Image Text.php,NONE,1.1
Status: Inactive
Brought to you by:
markwallis
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:25
|
Update of /cvsroot/comoblog/comoblog/include/pear/Image In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/include/pear/Image Added Files: Text.php Log Message: work in progress, ditching this server cos its borked ;( --- NEW FILE: Text.php --- <?php /** * Image_Text - Advanced text maipulations in images * * Image_Text provides advanced text manipulation facilities for GD2 * image generation with PHP. Simply add text clippings to your images, * let the class automatically determine lines, rotate text boxes around * their center or top left corner. These are only a couple of features * Image_Text provides. * @package Image_Text * @license The PHP License, version 3.0 * @author Tobias Schlitt <to...@ph...> * @category images */ /** * [...1161 lines suppressed...] // Get each paragraph $paras = explode("\n",$this->_text); // loop though the paragraphs // and get each word (token) foreach($paras as $para) { $words = explode(' ',$para); foreach($words as $word) { $this->_tokens[] = $word; } // add a "\n" to mark the end of a paragraph $this->_tokens[] = "\n"; } // we do not need an end paragraph as the last token array_pop($this->_tokens); } } |