Apache::Wyrd::Site::GDButton - Auto-generated buttons/text graphics

A wyrd to generate rectangular buttons using the GD library.

SYNOPSIS

<BASENAME::GDButton name="pushme" src="/

DESCRIPTION

GDButton produces a rectangular button with given text using the GD library. It can produce either image input or img tags, as requested.

GDButton uses it's membership in the Apache::Wyrd::Site::Widget class to track changes and decide when the output file should be regenerated. Note: GDButton internally draws itself at 5x the regular size and scales down in order to make a more aesthetically pleasing final result.

HTML ATTRIBUTES

src

File attribute. Must be absolute, relative, or root-dir-relative. Will seek through those options to find a writeable location and set the HTML attribute of the same to reflect the location of the output file. This file must end in either .png or .gif. The format of the output file will be determined by this file extension.

width, height

(required) in pixels.

bgcolor, color

(required) background and foreground color, in six-digit hex form (#RRGGBB).

size

Font size, in pixels.

font

Path to the font file. Either absolute, relative, or root-dir-relative. It must be a TrueType font file, and your version of GD must support TrueType fonts.

margin, tmargin, rmargin, bmargin, lmargin

Margin between text and edge of button, in pixels. Margin represents an overall number, and is the default for the others. Specific top, right, bottom, and left margins can be defined separately, falling back to the margin value.

name id action method alt align onmouseover onmouseout onclick border ismap longdesc usemap

Regular image attributes. Passed to the HTML untouched.

FLAGS

noantialias

Turn off antialiasing for the button.

BUGS/CAVEATS

Reserves the _format_output and _generate_output methods.

AUTHOR

Barry King <wyrd@nospam.wyrdwright.com>

SEE ALSO

Apache::Wyrd

General-purpose HTML-embeddable perl object

LICENSE

Copyright 2002-2007 Wyrdwright, Inc. and licensed under the GNU GPL.

See LICENSE under the documentation for Apache::Wyrd.