NAME

Image::TextMode::Reader::ANSI - Reads ANSI files

DESCRIPTION

Provides reading capabilities for the ANSI format.

ACCESSORS

  • tabstop - every Nth character will be a tab stop location (default: 8)

  • save_x - saved x position (default: 0)

  • save_y - saved y position (default: 0)

  • x - current x (default: 0)

  • y - current y (default: 0)

  • attr - current attribute info (default: 7, gray on black)

  • state - state of the parser (default: $S_TXT)

  • image - the image we're parsing into

  • linewrap - max width before we wrap to the next line (default: 80)

METHODS

set_position( [$x, $y] )

Moves the cursor to $x, $y.

set_attributes( @args )

Sets the default attribute information (fg and bg).

move_up( $y )

Moves the cursor up $y lines.

move_down( $y )

Moves the cursor down $y lines.

move_left( $x )

Moves the cursor left $x columns.

move_right( $x )

Moves the cursor right $x columns.

save_position( )

Saves the current cursor position.

restore_position( )

Restores the saved cursor position.

clear_screen( )

Clears all data on the canvas.

clear_line( $y )

Clears the line at $y.

rgb( $mode, $r, $g, $b )

Set the attribute to RGB color. Also, sets image to true-color mode.

feature_on( $code )

Enables a feature.

feature_off( $code )

Disables a feature.

new_line( )

Simulates a \n character.

tab( )

Simulates a \t character.

store( $char, $x, $y [, $attr] )

Stores $char at position $x, $y with either the supplied attribute or the current attribute setting.

AUTHOR

Brian Cassidy <bricas@cpan.org>

COPYRIGHT AND LICENSE

Copyright 2008-2022 by Brian Cassidy

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