
FLTK::AnsiWidget - Displays ANSI escape codes

Displays ANSI escape codes.
Escape sequences start with the characters ESC (ASCII 27d/1Bh/033o) and [ (left bracket).
This sequence is called CSI for "Control Sequence Introducer".
\ttab (20 px)
\abeep
\rreturn
\nnext line
\xCclear screen
\e[Kclear to end of line
\e[0mreset all attributes to their defaults
\e[1mset bold on
\e[4mset underline on
\e[7mreverse video
\e[21mset bold off
\e[24mset underline off
\e[27mset reverse off

ansiToFltk my $color = $ansiwidget->ansiToFltk( $color );Converts ANSI colors to FLTK colors.
beep $ansiwidget->beep( );Create audible beep sound.
clearScreen $ansiwidget->clearScreen( );Clear the offscreen buffer.
drawImage $ansiwidget->drawImage( $img,
$x,
$y,
$sx,
$sy,
$w,
$h );Draws the given image onto the offscreen buffer.
drawLine $ansiwidget->drawLine( $x1,
$y1,
$x2,
$y2 );Draw a line onto the offscreen buffer.
drawRect $ansiwidget->drawRect( $x1,
$y1,
$x2,
$y2 );Draw a rectangle onto the offscreen buffer.
drawRectFilled $ansiwidget->drawRectFilled( $x1,
$y1,
$x2,
$y2 );Draw a filled rectangle onto the offscreen buffer.
getFontSize getHeight getPixel my $color = $ansiwidget->getPixel( $x,
$y );Returns the color of the pixel at the given x,
y location.
getWidth getX getY layout new my $self = $ansiwidget->new( $x,
$y,
$w,
$h,
$defsize );Creates a new FLTK::AnsiWidget object.
print $ansiwidget->print( $str );Prints the contents of the given string onto the backbuffer.
saveImage $ansiwidget->saveImage( $filename,
$x,
$y,
$w,
$h );Save the offscreen buffer to the given filename.
setColor $ansiwidget->setColor( $color );Sets the current drawing color.
setFontSize setPixel $ansiwidget->setPixel( $x,
$y,
$color );Sets the pixel to the given color at the given X,
Y location.
setTextColor $ansiwidget->setTextColor( $fore,
$back );Sets the current text drawing color.
setXY textHeight my $height = $ansiwidget->textHeight( );Returns the height in pixels using the current font setting.
textWidth my $width = $ansiwidget->textWidth( $string );Returns the width in pixels using the current font setting.

For more information about ANSI code see:

Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/

Copyright (C) 2008-2010 by Sanko Robinson <sanko@cpan.org>
This program is free software; you can redistribute it and/or modify it under the terms of The Artistic License 2.0. See the LICENSE file included with this distribution or notes on the Artistic License 2.0 for clarification.
When separated from the distribution, all original POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See the clarification of the CCA-SA3.0.