Tree::Visualize::ASCII::BoundingBox - A bounding box for ASCII drawings |
Tree::Visualize::ASCII::BoundingBox - A bounding box for ASCII drawings
use Tree::Visualize::ASCII::BoundingBox;
my $box = Tree::Visualize::ASCII::BoundingBox->new(join "\n" => ( '+------+', '| test |', '+------+' ));
my $box2 = Tree::Visualize::ASCII::BoundingBox->new(join "\n" => ( '+-------+', '| test2 |', '+-------+' ));
my $box3 = $box->padRight(" ")->pasteRight($box2);
print $box3->getAsString();
# will give you: # +------+ +-------+ # | test | | test2 | # +------+ +-------+
$padding
of spaces, this will add it to the left side of the bounding box.
$padding
of spaces, this will add it to the right side of the bounding box.
$right
) this will paste it onto the left of the current bounding box.
$left
) this will paste it onto the right of the current bounding box.
$top
) this will paste it onto the top of the current bounding box.
$bottom
) this will paste it onto the bottom of the current bounding box.
None that I am aware of. Of course, if you find a bug, let me know, and I will be sure to fix it.
I use Devel::Cover to test the code coverage of my tests, below is the Devel::Cover report on this module test suite.
stevan little, <stevan@iinteractive.com>
Copyright 2004 by Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Tree::Visualize::ASCII::BoundingBox - A bounding box for ASCII drawings |