Ejemplo n.º 1
0
 public static function createText($text, $font, $size, $color, $bg, $adjx = 0, $adjy = 0)
 {
     $c = self::ttfBox($text, $font, $size);
     $width = $c['tr_x'] - $c['tl_x'];
     $height = $c['bl_y'] - $c['tl_y'];
     $gd = new GDImage($width, $height, $bg);
     $gd->write($text, $font, $size, $color, $height - $c['bl_y'] + $adjy, 0 - $c['bl_x'] + $adjx);
     return $gd;
 }