
A Swiss army knife of graphical tools.
menu_buttons - An array of pointers to hashes, representing the buttons that will be displayed
separator - A string of HTML to place between individual buttons
Creates a graphical heading with various optional features
Library_gfx includes a few convenience functions for
creating html textboxes suitable for use in webpages, and generating
static image header text useful for emails
parameter - descriptionwidth - width of the generated text box (defeault: 100%)height - height of the textbox. If unspecified, defaults to the content height.color_text_box_border - Drawn border colour (default $FORM->{'color_text_box_border'} or '#acac99')color_text-box_background - Default: $FORM->{'color_text_box_background'} or '#ffffff'get_text_box_startparameter - descriptionwidth - width of the generated text box (defeault: 100%)height - height of the textbox. If unspecified, defaults to the content height.color_text_box_border - Drawn border colour (default $FORM->{'color_text_box_border'} or '#acac99')color_text-box_background - Default: $FORM->{'color_text_box_background'} or '#ffffff'Library_gfx::get_menu_button_set will generate the html, styling, and javascript
needed to make a button menu bar such as the one below, suitable for site navigation and
forms. By default, javascript is included that shows a roll over version of the button
to show selection contrast. The img alt= attribute for each image
defaults to the value of the button text, but be sure to include the appropriate
HTML5 ARIA role for
accessibility best practices.
&Library_gfx::mixed_text_annotate(). The optimal geometries
for a given font and text length can be determined using
&Library_gfx::mixed_text_query_font_metric.
image - An imagemagick image to annotate. use
Image::Magick->new and Image::Magick->Readtext - String or array of strings to write to the imagefont - Font or array of fonts to use for the annotation.
These should be in the server's ImageMagick or LunpaCMS path.font_size - Integer size of font sizes to render.text_color - HTML or ImageMagick colour to render font in.x_offset - Distance from origin of image.y_offset - Distance from origin image.gravity - Sets gravity for optional text shadow. Defaults to 'northwest'font_directory - Path to search for true-type
fonts in. Defaults to /usr/share/fonts/default/TrueTypeno_shadow - Boolean to disable rendering text with a shadow.shadow_color - Colour to render shadow. Defaults to 'grey'.shadow_depth - Level of blurring for text shadow (0 - 100)shadow_x_offset - Horizontal shadow offset (default 1)shadow_y_offset - Vertical shadow offset (default 2)&Library_gfx::mixed_text_query_font_metric can help to annotate
images with variable text length in a predictable and graceful way.
width, height, ascender,
descenderimage - An imagemagick image to annotate. use
Image::Magick->new and Image::Magick->Readtext - String or array of strings to write to the imagefont - Font or array of fonts to use for the annotation.
These should be in the server's ImageMagick or LunpaCMS path.font_size - Integer size of font sizes to render.text_color - HTML or ImageMagick colour to render font in.|
Copyright © 2026 Peregrine Computer Consultants Corp. All rights reserved.
About Lunpa, our mascot. Her mother was a hamster and her father was an ill-tempered Chilean M00se. Oddly, neither smelt of elderberries. The artist is Jennifer Lomax. |
|
Add Your Comment