NAME

Buttoner.pm - Make button GIFs via GD


AUTHOR

 David M. Chess


SYNOPSIS

    use Buttoner;

    # 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


HISTORY

  1999/08/31 - First release version, 1.00


BUGS

None currently known; see Plans and Limitations


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 gdFont(s).

Buttons are always just rectangles; would be nice to allow rounded-corner buttons, at least.


Creating a new object


new(width,height,text,red,gre