PHP ImageTTFText - Colors
#1

Hi guys! I have this:
PHP код:
ImageTTFText($img, 9, 0.0, 450, 85, $colorWhite, $fontSFS, "Race: " . $p["RacePoints"]); 
And i want to color just one character from word "Race:" It's that possible?! Can somebody give me some ideas about how to to this thing?


Final Result:
Reply
#2

Yup, but you have to separate this to 2 function calls. (I can't see final result so can't tell if this is what you want)

(assuming you add $colorRed)

PHP код:
ImageTTFText($img, 9, 0.0, 450, 85, $colorRed, $fontSFS, 'R');
ImageTTFText($img, 9, 0.0, 457, 85, $colorWhite, $fontSFS, "Race: {$p['RacePoints']}"); 
Tweak X in second function as needed.
Reply
#3

I will try right now
EDIT: Nice ideea ) thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)