Location: PHPKode > scripts > ATextImage > atextimage/offset.php
<?php
require "class.atextimage.php";
$timg = new ATextImage();
$fnt=($_GET['fnt'])?$_GET['fnt']:"arial.ttf";
$just=($_GET['j'])?$_GET['j']:"left";
$ht=($_GET['h'])?$_GET['h']:0;
$wd=($_GET['w'])?$_GET['w']:0;
if($_GET["txt"]){
 $txt="".stripslashes($_GET["txt"])."";
 $tx=explode("|",$txt);
 foreach($tx as $t)
 {
 $timg->AddLine($t);
 }
}
$wd=400;
$ht=200;
$horz=($_GET['horz'])?$_GET['horz']:"center";
$vert=($_GET['vert'])?$_GET['vert']:"center";
$sz=($_GET['sz'])?$_GET['sz']:25;
$timg->SetFont($fnt,$sz);
$timg->SetBackground(255,255,255);
$timg->SetBorder(0,0,150);
$timg->AddLine("A Line with shadow");

$timg->SetPos($horz,$vert,$just);       // (horizontal,vertical) positions

$timg->SetTextColor(150,150,150);
$timg->SetOffset(2,2);
$timg->MakeImage($wd,$ht);

$timg->SetTextColor(100,100,100);
$timg->SetOffset(1,1);
$timg->MakeImage(0,0);

$timg->SetTextColor(0,0,200);
$timg->SetOffset(0,0);
$timg->MakeImage(0,0);


$timg->SetOffset(-50,-30);
$timg->SetPos("center","bottom","center");
$timg->AddLine("Offset, no shadow",TRUE);
$timg->MakeImage(0,0);

$timg->ShowGif();
?> 
Return current item: ATextImage