PHP Classes
elePHPant
Icontem

Button Maker Lite: Generate button images with text dynamically

Recommend this page to a friend!
  Info   View files View files (14)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2007-02-25 (9 years ago) RSS 2.0 feedNot enough user ratingsTotal: 1,403 All time: 2,681 This week: 1,099Up
Version License Categories
buttonmaker-lite 1.0BSD LicenseGraphics
Description Author

This class can be used to generate button images with text dynamically.

It generates an image with a given background pattern image and renders a text label over the background at a given position.

The dimensions of the button are adjusted according to the text bounding box size.

The button image may have different types of border styles: in, out or flat. The text font and color is configurable.

The generated button image can be can be served as the current script output in either the JPEG, GIF or PNG formats.

Picture of ben
Name: ben <contact>
Classes: 3 packages by
Country: The Netherlands The Netherlands

Details
####################################################################
#	Date: 19-10-2006 19:23
#	Author: B.Heesen (b.heesen@dbds.nl)
#	Version: 0.1
#	© Copyright 2006 De Bron Digital Solutions (http://www.dbds.nl)
####################################################################

README BUTTONMAKER-LITE

unzip the file
make a directorie: "fonts"
put your TTF fonts in the "fonts" directory
in the class the default is arial.ttf

In the full version there are also other features like:
shadow
upload fonts/images
use background image
gradient backgroundcolors
rotation


LEESMIJ BUTTONMAKER-LITE

pak het bestand uit
maak een mappen aan: "fonts"
plaats je TTF fonts in deze map "fonts"

In de volledige versie zijn er ook de volgende opties zoals:
schaduw
uploaden van lettertypes en afbeeldingen
gradient achtergrondkleuren
het gebruik van een achtergrond afbeelding
roteren



Example/Voorbeeld:

require_once ('class.buttonmaker.lite.php');  //the needed classfile
$btn = new BMaker();		//initiate the class
$btn->format('jpg');		//imagetype : jpg,gif or png
$btn->text('test');	//text to put on button
$btn->font(''); //defaults to arial.ttf
$btn->fontsize(20);  //defaults to 10px
$btn->textx(5);  //nr of pixels from the left
$btn->texty(20);  // nr of pixels from the top
$btn->bordertype('out');	//in out flat
$btn->bgcolor('#FFFFFF');  //background color in HEX
$btn->fgcolor('#000000');		//fontcolor in HEX
$btn->Buttonmaker(100, 25);//width height
  Files folder image Files  
File Role Description
Accessible without login Plain text file btn-lite.php Example example of use output
Plain text file class.buttonmaker.lite.php Class class file
Accessible without login Plain text file colorCoder.js Data extra javascript for colorselect
Accessible without login Plain text file color_select.css Data css for colorselector
Accessible without login Plain text file color_select.js Data javascript for colorselect
Accessible without login Image file dbds.gif Icon logo of dbds
Accessible without login Image file hue_blend.png Data image for colorselection
Accessible without login Plain text file index.php Example example of use
Accessible without login Plain text file lang.en.nl Conf. english language file
Accessible without login Plain text file lang.ge.php Conf. german language file with thanks to Klaus Follmann
Accessible without login Plain text file lang.it.php Conf. italian language file with thanks to Luca Zorzi
Accessible without login Plain text file lang.nl.php Conf. dutch language file
Accessible without login Plain text file readme.txt Doc. readme
Accessible without login Image file sv_blend.png Data image for colorselect

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,403
This week:0
All time:2,681
This week:1,099Up