Buttoner.pm - Make button GIFs via GD
David M. Chess
# create a simple button and save as a GIF $button = new Buttoner::Button(120,30,"Push Here"); print OUTH $button->gif();
# Exercising more control... $button = new Buttoner::Button(140,40,"Continue",0,128,0); $button->setCenterText(1); # Center the text $button->setEdgeWidth(2); # Mess with the shape $button->setBlur(1); # and fuzz it a little print GIFNORMAL $button->gif(); # Save that $button->setTextColor(255,0,0); # Red-text version print GIFACTIVE $button->gif(); # Save that $button->setPressed(1); # Pressed-button version $button->setTextStyle("raise"); # with "raised" text print GIFPUSHED $button->gif(); # and save that
1999/08/31 - First release version, 1.00
None currently known; see Plans and Limitations
The text font is always gdGiantFont which, despite the name, is a mere 9x15
pels. Should use a smaller font for teensy buttons, and (to begin with) use
copyResized() to fake a larger font for larger buttons.
Ideally, should access the system fonts and use those instead of the
Buttons are always just rectangles; would be nice to allow rounded-corner buttons, at least.