Why not adopt me?
NAME
Term::Drawille - Draw to your terminal using Braille characters
VERSION
version 0.01
SYNOPSIS
use Term::Drawille;
binmode STDOUT, ':encoding(utf8)';
my $canvas = Term::Drawille->new(
width => 400,
height => 400,
);
for(my $i = 0; $i < 400; $i++) {
$canvas->set($i, $i, 1);
}
print $canvas->as_string;
DESCRIPTION
Text::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 (https://github.com/asciimoo/drawille); its page has some screenshots that demonstrate what it and this module can accomplish.
METHODS
Term::Drawille->new(%params)
Creates a new canvas to draw on.
Valid key value pairs for %params
are:
width
Specify the width of the canvas in pixels.
height
Specify the height of the canvas in pixels.
$canvas->set($x, $y, [$value])
Sets the value of the pixel at ($x
, $y
) to $value
. If $value
is omitted, it defaults to 1
.
The $value is interpreted as a boolean: whether or not to draw the pixel at the given position.
$canvas->as_string
Draws the canvas as a string of Braille characters and returns it. Note that the string consists of Unicode characters 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.
SEE ALSO
https://github.com/asciimoo/drawille
AUTHOR
Rob Hoelz <rob@hoelz.ro>
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.
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.