Image::Button::Plain - Builds plain rectangular PNG buttons
use Image::Button::Plain; my $b1 = new Image::Button::Plain(text => 'text b1', font => 'newsgotn.ttf', fontsize => 20, bdcolor => [0, 0, 0], # border file => 'b1.png'); $b1->print;
Builds a plain vanilla rectangular button, with an optional border, using GD with TrueType support. See Image::Button for more details about things you can do with Buttons.
my $b = new Image::Button::Plain(text => 'text', font => 'newsgotn.ttf', fontsize => 20, file => 'file.png');
The arguments are
Defaults to ''.
The TrueType font with which to print. It should be localted either in the current directory or in the directory pointed at by the environment variable TTFONTS. Mandatory.
Font size. Defaults to 12 points.
File where the button will be saved. Can be overridden in the print function. Mandatory if you plan to use Image::Button::Set to output several related buttons at a time. Defaults to the button text, replacing spaces by '-'. Use '>-' if you want to send the image to standard output.
Background color in RGB (so [255,255,255] is white and [0,0,0] is black). Defaults to [255,255,255]. Used only as a default for btcolor, down there, for compatibility with other button types.
Button color in RGB . Defaults to the background color, which in turn defaults to white.
Foreground (text) color in RGB. Defaults to [0,0,0].
Border color in RGB. Defaults to the button color, so if you don't set it you'll get a solid rectangle of btcolor.
Border size in pixels. Note that if you want to see the border you have to set the border color with bdcolor. Defaults to 1.
Vertical margin under and over the text. Defaults to 4 pixels.
Horizontal margin left and right of the text. Defaults to 4 pixels.
Image::Button for a description of how to make buttons, and other functions you can use with Image::Button::Plain.
Image::Button::Set for building sets of related buttons.
Juan M. García-Reyero <joanmg@twostones.org>
Copyright (C) 2003 Juan M. García-Reyero. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'García-Reyero'. Assuming CP1252
To install Image::Button, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Image::Button
CPAN shell
perl -MCPAN -e shell install Image::Button
For more information on module installation, please visit the detailed CPAN module installation guide.