1 | <?php |
---|
2 | define('MFONT', 'mods/signature_generator/signatures/myrmidon/evesansmm.ttf'); |
---|
3 | define('FSIZE', 12); |
---|
4 | |
---|
5 | $im = imagecreatefromjpeg('mods/signature_generator/signatures/myrmidon/base.jpg'); |
---|
6 | |
---|
7 | $red = imagecolorallocate($im, 255, 10, 10); |
---|
8 | $orange = imagecolorallocate($im, 150, 120, 20); |
---|
9 | $blue = imagecolorallocate($im, 0, 0, 200); |
---|
10 | $white = imagecolorallocate($im, 255, 255, 255); |
---|
11 | $black = imagecolorallocate($im, 0, 0, 0); |
---|
12 | |
---|
13 | $grey_trans = imagecolorallocatealpha($im, 50, 50, 50, 50); |
---|
14 | $grey_transblue = imagecolorallocatealpha($im, 50, 50, 110, 10); |
---|
15 | $grey_transbluel = imagecolorallocatealpha($im, 50, 50, 110, 100); |
---|
16 | |
---|
17 | $name = strtoupper($pilot->getName()); |
---|
18 | |
---|
19 | $list = new KillList(); |
---|
20 | $list->setOrdered(true); |
---|
21 | $list->setPodsNoobships(false); |
---|
22 | $list->addInvolvedPilot($pilot); |
---|
23 | $kill = $list->getKill(); |
---|
24 | $list->getallKills(); |
---|
25 | |
---|
26 | imagettftext($im, FSIZE, 0, 80, 21, $grey_trans, MFONT, $name); |
---|
27 | imagettftext($im, FSIZE, 0, 80, 20, $white, MFONT, $name); |
---|
28 | |
---|
29 | $no = $list->getCount(); |
---|
30 | $string = 'KILL# '.$no; |
---|
31 | imagettftext($im, FSIZE, 0, 80, 41, $grey_trans, MFONT, $string); |
---|
32 | imagettftext($im, FSIZE, 0, 80, 40, $white, MFONT, $string); |
---|
33 | |
---|
34 | $string = strtoupper($kill->getVictimName().' - '.$kill->getVictimCorpName()); |
---|
35 | $box = imagettfbbox(FSIZE, 0, MFONT, $string); |
---|
36 | $width = $box[4]; |
---|
37 | imagettftext($im, FSIZE, 0, 80, 76, $grey_trans, MFONT, $string); |
---|
38 | imagettftext($im, FSIZE, 0, 80, 75, $white, MFONT, $string); |
---|
39 | |
---|
40 | $string = strtoupper($kill->getVictimShipName()); |
---|
41 | $box = imagettfbbox(FSIZE, 0, MFONT, $string); |
---|
42 | $width = $box[4]; |
---|
43 | imagettftext($im, FSIZE, 0, 394-$width, 61, $grey_trans, MFONT, $string); |
---|
44 | imagettftext($im, FSIZE, 0, 394-$width, 60, $white, MFONT, $string); |
---|
45 | |
---|
46 | $string = $kill->getSolarSystemName(); |
---|
47 | $box = imagettfbbox(FSIZE, 0, MFONT, $string); |
---|
48 | $width = $box[4]; |
---|
49 | imagettftext($im, FSIZE, 0, 394-$width, 76, $grey_trans, MFONT, $string); |
---|
50 | imagettftext($im, FSIZE, 0, 394-$width, 75, $white, MFONT, $string); |
---|
51 | |
---|
52 | function bevel($x, $y, $size) |
---|
53 | { |
---|
54 | global $im, $grey_transblue, $grey_transbluel,$red; |
---|
55 | imagefilledrectangle($im, $x+1, $y+$size-3, $x+$size-1, $y+$size, $grey_transbluel); |
---|
56 | imagefilledrectangle($im, $x+$size-3, $y+1, $x+$size, $y+$size-1, $grey_transbluel); |
---|
57 | imageline($im, $x+1, $y-1, $x+$size, $y-1, $grey_transbluel); |
---|
58 | imagerectangle($im, $x, $y, $x+$size, $y+$size, $grey_transblue); |
---|
59 | } |
---|
60 | |
---|
61 | // ship |
---|
62 | $sid = $kill->victimshipexternalid_; |
---|
63 | $img = imagecreatefrompng("img/ships/64_64/".$sid.".png"); |
---|
64 | imagecopyresized($im, $img, 354, 6, 0, 0, 40, 40, 64, 64); |
---|
65 | |
---|
66 | bevel(354, 6, 40); |
---|
67 | |
---|
68 | // player portrait |
---|
69 | $pid = $pilot->row_['plt_externalid']; |
---|
70 | if (!$pid) |
---|
71 | { |
---|
72 | $pid = 0; |
---|
73 | } |
---|
74 | $img = imagecreatefromjpeg("cache/portraits/".$pid."_128.jpg"); |
---|
75 | //imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans); |
---|
76 | imagecopyresized($im, $img, 6, 6, 0, 0, 63, 63, 128, 128); |
---|
77 | imagedestroy($img); |
---|
78 | |
---|
79 | bevel(6, 6, 63); |
---|
80 | ?> |
---|