☼ 林永忠 ☼ > Text-Orientation-0.04 > Text::Orientation

Download:
Text-Orientation-0.04.tar.gz

Dependencies

Annotate this POD

Related Modules

Win32::Clipboard
Win32::GuiTest
HTML::Entities
more...
By perlmonks.org
View/Report Bugs
Module Version: 0.04   Source  

NAME ^

Text::Orientation - Text Rotator

SYNOPSIS ^

  use Text::Orientation;

  # OO

  $rot = Text::Orientation->new( TEXT => "Rotate me!" );
  print $rot->mirror('horizontal');
  print $rot->rotate(+1);


  # PerlIO layer

  use Text::Orientation method => 'mirror', param => 'horizontal', charset=> 'Big5';
  binmode(STDOUT, ":via(Text::Orientation)") or die;

  print BLAH BLAH BLAH ...

DESCRIPTION ^

This module enables one to rotate text. For example, Chinese can be written downwards or leftwards, but it is usually not convenient to do so on one's computer. With Text::Orientation one can easily deal with this problem.

PerlIO layer interface is also provided for easier coding.

METHODS ^

new

 $rot = Text::Orientation->new( TEXT => text or text's ref, CHARSET => blah);

Constructor. As for TEXT, either a string or a reference to an array of text will do. Please specify CHARSET If the input text is encoded in multibyte character set.

charset

Changes the encoding of the text. If not set, text is treated as encoded in single byte.

text

Changes the text to rotate.

transpose

Transposes text along the diagonal.

anti_transpose

Transposes text along the antidiagonal.

mirror

Generates the mirrored image of input string in two ways: 'vertical' or 'horizontal'.

rotate

Rotates the text. The parameter is an integer. Positive is for clockwise rotation, and negative for counterclockwise. E.g. -3 for 270-degree counterclockwise rotation

AUTHOR ^

xern <xern@cpan.org>

SEE ALSO ^

String::Multibyte

LICENSE ^

Released under The Artistic License

syntax highlighting: