Image::TextMode::Canvas - A canvas of text mode pixels
This module represents the graphical portion of an image, i.e. a grid of pixels.
width - the width of the canvas
height - the height of the canvas
pixeldata - an arrayref of arrayrefs of pixel data
Creates a new canvas.
Get raw pixel data at $x, $y.
$x
$y
Create a pixel object data at $x, $y. Available options include:
blink_mode - enabed or disable blink mode for the pixel object
Store pixel data at $x, $y.
returns a list of the width and height of the image.
Clears the canvas pixel data.
Clears the data at line $y. Specify a range to clear only a portion of line $y.
Removes the line from the canvas, moving all subsquent lines up.
Returns only the character data stored in the canvas.
Finds the last defined pixel on a given line. Useful for optimizing writes in formats where width matters. Returns undef for a missing line.
Perform nearest neighbor scaling in text mode. Returns a new textmode image.
# scale down to 1/4 the original size my $scaled = $image->ansiscale( 0.25 );
Brian Cassidy <bricas@cpan.org>
Copyright 2008-2015 by Brian Cassidy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Image::TextMode, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Image::TextMode
CPAN shell
perl -MCPAN -e shell install Image::TextMode
For more information on module installation, please visit the detailed CPAN module installation guide.