PHP Classes
Icontem

File: justdemo.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of George Clarke  >  ATextImage  >  justdemo.php  
File: justdemo.php
Role: Example script
Content type: text/plain
Description: Used with demo.html, Examples of left, center, and right justification of text.
Class: ATextImage
Layout and render text on images
 

Contents

Class file image Download
<?php
require "class.atextimage.php";
$timg = new ATextImage();
$fnt=($_GET['fnt'])?$_GET['fnt']:"arial.ttf";
$just=($_GET['j'])?$_GET['j']:"center";
$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);
 }
}
$horz=($_GET['horz'])?$_GET['horz']:"center";
$vert=($_GET['vert'])?$_GET['vert']:"center";
$sz=($_GET['sz'])?$_GET['sz']:12;
$timg->SetFont($fnt,$sz);
$timg->SetBackground(255,255,255);
$timg->SetTextColor(150,0,0);
$timg->SetPos($vert,$horz,$just);       // (horizontal,vertical) positions
//$timg->CreateImage("d:\wwwsites\gaclarkecom\www\lava.gif");
$timg->MakeImage($wd,$ht);
$timg->ShowGif();
?> 

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products