README.pod

May 24, 2014 · View on GitHub

=pod

=encoding UTF-8

=head1 NAME

Term::Drawille - Draw to your terminal using Braille characters

=head1 VERSION

version 0.01

=head1 SYNOPSIS

use Term::Drawille;

binmode STDOUT, ':encoding(utf8)'; my $canvas = Term::Drawille->new( width => 400, height => 400, );

for(my i=0;i = 0; i < 400; i++) { canvas->set(i,i, i, 1); }

print $canvas->as_string;

=head1 DESCRIPTION

LText::Drawille makes use of Braille characters to allow you to draw lines, circles, pictures, etc, to your terminal with a surprising amount of precision. It's based on a Python library (Lhttps://github.com/asciimoo/drawille); its page has some screenshots that demonstrate what it and this module can accomplish.

=head1 METHODS

=head2 Term::Drawille->new(%params)

Creates a new canvas to draw on.

Valid key value pairs for C<%params> are:

=head3 width

Specify the width of the canvas in pixels.

=head3 height

Specify the height of the canvas in pixels.

=head2 canvas>set(canvas->set(x, y,[y, [value])

Sets the value of the pixel at (C<x>,C<x>, C<y>) to C<value>.IfC<value>. If C<value> is omitted, it defaults to C<1>.

The $value is interpreted as a boolean: whether or not to draw the pixel at the given position.

=head2 $canvas->as_string

Draws the canvas as a string of Braille characters and returns it. Note that the string consists of Unicode B and not raw bytes; this means you'll likely have to encode it before sending it to the terminal. This may change in future releases.

=head1 SEE ALSO

Lhttps://github.com/asciimoo/drawille

=head1 AUTHOR

Rob Hoelz rob@hoelz.ro

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Rob Hoelz.

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

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/hoelzro/term-drawille/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

=cut