package Agar::Text; use strict; use Agar; 1; __END__ =head1 NAME Agar::Text - text rendering functions for Agar widgets =head1 SYNOPSIS use Agar; use Agar::Text; =head1 DESCRIPTION These methods are useful when implementing Agar widgets which need to render text. They must be called from the rendering context (draw routine) of an L. =head1 METHODS =item B Push the current text rendering state onto the text rendering state stack. Useful if you want to change the state temporarily, you can pop the stack again once you've finished. =item B Pop the text rendering state to revert to the text rendering state previously pushed onto the stack. =item B Set the text justification mode. This may be "left", "right" or "center". =item B Set the vertical alignment mode. This may be "top", "middle" or "bottom". =item B Set the color for rendered text from red, green and blue 8-bit values. =item B Set the color for rendered text from red, green, blue and alpha (transparency) 8-bit values. =item B Set the background color for rendered text from red, green and blue 8-bit values. =item B Set the background color for rendered text from red, green, blue and alpha (transparency) 8-bit values. =item B Set the font for the current text rendering state. =item B<$w = Agar::Text::Width($text)> Returns the width in pixels of the given text if it were to be rendered using the current font. =item B<$h = Agar::Text::Height($text)> Returns the height in pixels of the given text if it were to be rendered using the current font. =over 4 =back =head1 AUTHOR Mat Sutcliffe EFE Julien Nadeau Carriere EFE =head1 SEE ALSO L, L, L =cut