1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| $IT='imagettftext';
$DCL=$_POST['CertifLevel'];
$FF='MS/AAA/ARIALUNI.TTF';
$S1=60;
$S2=50;
$S3=24;
$S4=13;
$DFileW=996;
$Dipl=imagecreatefromjpeg("MS/AAA/Dipl0.jpg");
$TiC=imagecolorallocate($Dipl, 255, 255, 255);
$TeC=imagecolorallocate($Dipl, 0, 0, 0);
$Txt=$_POST['CertifLevel'];
$FS=$S1;
$Box=imagettfbbox($FS, 0, $FF, $Txt);
$Size=abs($Box[0])+abs($Box[2]);
if ($Size>896) {$FS=round($S1*890/$Size); $Box=imagettfbbox($FS, 0, $FF, $Txt);}
$X=round(($DFileW/2)-((abs($Box[0])+abs($Box[2]))/2)-2);
$Y=103;
$IT($Dipl, $FS, 0, $X, $Y, $TiC, $FF, $Txt);
$X=$X+1;
$IT($Dipl, $FS, 0, $X, $Y, $TiC, $FF, $Txt); |
Partager