combining color in a text
Posted: 2008-09-18T02:32:18-07:00
how do i combine color in a text?
something like this
This is my text
currently what i have right now is this
$draw = new ImagickDraw();
$im = new Imagick("thisistheimagefile.jpg" );
$draw->setFont( "Fonts/arial.ttf" );
$draw->setFontSize(12 );
$draw->setGravity( Imagick:: GRAVITY_WEST );
$draw->setFillColor(new ImagickPixel("#40FF80r"));
$im->annotateImage( $draw, 0, 0, 0, "this" );
$im->drawImage($draw);
$draw->setFillColor(new ImagickPixel("#8040BF"));
$im->annotateImage( $draw, 0, 0, 0, "is " );
$im->drawImage($draw);
$draw->setFillColor(new ImagickPixel("#BF00BF"));
$im->annotateImage( $draw, 0, 0, 0, "my text" );
$im->drawImage($draw);
im a little bit lost on what to do , im assuming computing the x coordinate or y coordinate "annotateImage", but its too complicated, since the text entry is a user entry (it has WYSWYG)
TIA
something like this
This is my text
currently what i have right now is this
$draw = new ImagickDraw();
$im = new Imagick("thisistheimagefile.jpg" );
$draw->setFont( "Fonts/arial.ttf" );
$draw->setFontSize(12 );
$draw->setGravity( Imagick:: GRAVITY_WEST );
$draw->setFillColor(new ImagickPixel("#40FF80r"));
$im->annotateImage( $draw, 0, 0, 0, "this" );
$im->drawImage($draw);
$draw->setFillColor(new ImagickPixel("#8040BF"));
$im->annotateImage( $draw, 0, 0, 0, "is " );
$im->drawImage($draw);
$draw->setFillColor(new ImagickPixel("#BF00BF"));
$im->annotateImage( $draw, 0, 0, 0, "my text" );
$im->drawImage($draw);
im a little bit lost on what to do , im assuming computing the x coordinate or y coordinate "annotateImage", but its too complicated, since the text entry is a user entry (it has WYSWYG)
TIA