PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Images » Image_Text » Bug #2449

Change color of text by word

Details

Request #2449Change color of text by word
Submitted2004-10-04 20:50 UTC
Fromse at hexatex dot de
Assignedbigmichi1
StatusClosed
PackageImage_Text
PHP Version4.3.8
Roadmaps0.8.0

Comments

[2004-10-04 20:50 UTC] se at hexatex dot de

Description:
------------
It would be nice to be able to change the color of text by Word, so that we could have a line with text with different words having different colors. It would be even nicer to be able to do that on a character basis.

Reproduce code:
---------------
# that is one way it could look

$image_text->setColor('#ffff00');
$image_text->addText('Eins ');
$image_text->setColor('#ff0000');
$image_text->addText('Zwei ');
$image_text->setColor('#00ff00');
$image_text->addText('Drei');
$image_text->render();

Expected result:
----------------
The word "Eins ", "Zwei " and "Drei " would be different colors, but on one line.

Thanks
Sascha Ebach