The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Image::TextMode::Canvas - A canvas of text mode pixels

ACCESSORS

  • width - the width of the canvas

  • height - the height of the canvas

  • pixeldata - an arrayref of arrayrefs of pixel data

METHODS

new( %args )

Creates a new canvas.

getpixel( $x, $y )

Get raw pixel data at $x, $y.

getpixel_obj( $x, $y, \%options )

Create a pixel object data at $x, $y. Available options include:

  • blink_mode - enabed or disable blink mode for the pixel object

putpixel( \%pixel, $x, $y )

Store pixel data at $x, $y.

dimensions( )

returns a list of the width and height of the image.

clear_screen( )

Clears the canvas pixel data.

clear_line( $y, [ \@range ] )

Clears the data at line $y. Specify a range to clear only a portion of line $y.

as_ascii( )

Returns only the character data stored in the canvas.

AUTHOR

Brian Cassidy <bricas@cpan.org>

COPYRIGHT AND LICENSE

Copyright 2008-2009 by Brian Cassidy

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.