Follow SMF on Twitter.
Started by sebastian, August 20, 2005, 10:42:12 PM
ImageString($im, 3, 100, 37, "BTC-Guild User: $user_name", $lightblue); ImageLine($im, 100, 50, 302, 50, $lightblue);
Quote from: Sir Cumber-Patcher on January 28, 2014, 11:06:02 PMThis is why I sort of hinted at "Then for the end of the line, y will be the same (since it's horizontal) and x will be the start plus the number of letters * the width of the font in use"As in you know the line you're writing, you know the number of letters in it (strlen is your friend), you know the size of the font (imagefontwidth is your friend)... I'm pretty sure by now that you know how to multiply two numbers together and add another...
$str = "BTC-Guild User: " . $user_name; $length = strlen($str); ImageString($im, 3, 100, 37, "$str - $length", $lightblue); ImageLine($im, 100, 50, 302, 50, $lightblue);