Exemplo n.º 1
0
$im = imagecreatefromjpeg(dirname(__FILE__) . '/base.jpg');
$red = imagecolorallocate($im, 255, 10, 10);
$orange = imagecolorallocate($im, 150, 120, 20);
$blue = imagecolorallocate($im, 0, 0, 200);
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
$grey_trans = imagecolorallocatealpha($im, 50, 50, 50, 50);
$grey_transblue = imagecolorallocatealpha($im, 50, 50, 110, 10);
$grey_transbluel = imagecolorallocatealpha($im, 50, 50, 110, 100);
$name = strtoupper($pilot->getName());
$list = new KillList();
$list->setOrdered(true);
$list->setPodsNoobships(false);
$list->addInvolvedPilot($pilot);
$kill = $list->getKill();
$list->getallKills();
imagefttext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name);
imagefttext($im, FSIZE, 0, 80, 20, $white, MFONT, $name, array('hdpi' => 200));
$no = $list->getCount();
$string = 'KILL# ' . $no . '     TOTAL POINTS ' . $list->getPoints();
imagettftext($im, FSIZE, 0, 80, 41, $grey_trans, MFONT, $string);
imagettftext($im, FSIZE, 0, 80, 40, $white, MFONT, $string);
$string = strtoupper($kill->getVictimName() . ' ' . $kill->getVictimCorpName());
$box = imagettfbbox(FSIZE, 0, MFONT, $string);
$width = $box[4];
imagettftext($im, FSIZE, 0, 349 - $width, 21, $grey_trans, MFONT, $string);
imagettftext($im, FSIZE, 0, 349 - $width, 20, $white, MFONT, $string);
$string = strtoupper($kill->getVictimShipName());
$box = imagettfbbox(FSIZE, 0, MFONT, $string);
$width = $box[4];
imagettftext($im, FSIZE, 0, 349 - $width, 41, $grey_trans, MFONT, $string);