File Coverage

blib/lib/Term/Graille.pm
Criterion Covered Total %
statement 34 325 10.4
branch 1 168 0.6
condition 0 72 0.0
subroutine 12 48 25.0
pod 20 35 57.1
total 67 648 10.3


line stmt bran cond sub pod time code
1             =head1 NAME
2              
3             Term::Graille - Graphical Display in the terminal using UTF8 Braille characters
4              
5             =head1 SYNOPSIS
6            
7             my $canvas = Term::Graille->new(
8             width => 72, # pixel width
9             height => 64, # pixel height
10             top=>3, # row position in terminal (optional,defaults to 1)
11             left=>10, # column position (optional,defaults to 1)
12             borderStyle => "double", #
13             );
14              
15             =head1 DESCRIPTION
16              
17             Inspired by Drawille by asciimoo, which has many variants (including
18             a perl variant Term::Drawille by RHOELZ), this is a clone with a few
19             extras. The goal is to achieve performance and features. with built-in
20             turtle-like graphics, line and curve drawing (Algorithm::Line::Bresenham),
21             scrolling, border setting, and more in development.
22              
23             =begin html
24              
25            
26              
27             =end html
28              
29              
30             =head1 FUNCTIONS
31              
32             =cut
33              
34             package Term::Graille;
35              
36 1     1   60951 use strict;use warnings;
  1     1   2  
  1         24  
  1         4  
  1         2  
  1         30  
37             our $VERSION="0.09";
38 1     1   535 use utf8;
  1         12  
  1         4  
39 1     1   450 use open ":std", ":encoding(UTF-8)";
  1         979  
  1         5  
40 1     1   12345 use base 'Exporter';
  1         1  
  1         95  
41             our @EXPORT_OK = qw/colour paint printAt clearScreen border blockBlit block2braille pixelAt cursorAt/;
42 1     1   6 use Algorithm::Line::Bresenham 0.15;
  1         16  
  1         31  
43 1     1   432 use Time::HiRes "sleep";
  1         1148  
  1         3  
44              
45             BEGIN {
46 1 50   1   717 if ($^O eq "MSWin32") {
47 0         0 system("chcp 65001 >nul");
48 0         0 system("echo 'Please set console font to one that can handle utf8 fonts'")
49             }
50             }
51              
52             =head3 Cnew(%params)>
53              
54             Creates a new canavas; params are
55             C The pixel width, required C the pixel height, required,
56             C terminal row (optional,default 1) C terminal column (
57             optional,default 1) C border type (optional,one of 'simple',
58             'double', 'thin', 'thick' or 'shadow') C border colour (
59             optional), C Title text for top border,(optional) C<titleColour> </td> </tr> <tr> <td class="h" > <a name="60">60</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Title colour (optional) </td> </tr> <tr> <td class="h" > <a name="61">61</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="62">62</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="63">63</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="64">64</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="65">65</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub new{ </td> </tr> <tr> <td class="h" > <a name="66">66</a> </td> <td class="c0" > <a href="#67"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#66-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#66-1"> 1 </a> </td> <td >   </td> <td class="s"> my ( $class, %params ) = @_; # params are width and height in pixels </td> </tr> <tr> <td class="h" > <a name="67">67</a> </td> <td class="c0" > <a href="#68"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $self={width=>$params{width},height=>$params{height}}; </td> </tr> <tr> <td class="h" > <a name="68">68</a> </td> <td class="c0" > <a href="#69"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> for my $key (qw/borderStyle borderColour title titleColour top left cartesian/){ </td> </tr> <tr> <td class="h" > <a name="69">69</a> </td> <td class="c0" > <a href="#71"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#69-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{ $key}=$params{$key} if exists $params{$key} </td> </tr> <tr> <td class="h" > <a name="70">70</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="71">71</a> </td> <td class="c0" > <a href="#72"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#71-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{top}//=1; </td> </tr> <tr> <td class="h" > <a name="72">72</a> </td> <td class="c0" > <a href="#73"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#72-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{left}//=1; </td> </tr> <tr> <td class="h" > <a name="73">73</a> </td> <td class="c0" > <a href="#74"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#73-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{cartesian}//=1; </td> </tr> <tr> <td class="h" > <a name="74">74</a> </td> <td class="c0" > <a href="#75"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{setPix}=[['⡀','⠄','⠂','⠁'],['⢀','⠠','⠐','⠈']]; </td> </tr> <tr> <td class="h" > <a name="75">75</a> </td> <td class="c0" > <a href="#77"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{unsetPix}=[['⢿','⣻','⣽','⣾'],['⡿','⣟','⣯','⣷']]; </td> </tr> <tr> <td class="h" > <a name="76">76</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}={x=>$self->{width}/2, # integrated Turtle Graphics </td> </tr> <tr> <td class="h" > <a name="77">77</a> </td> <td class="c0" > <a href="#83"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> y=>$self->{height}/2, # initial variables x, y and direction </td> </tr> <tr> <td class="h" > <a name="78">78</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> d=>0, </td> </tr> <tr> <td class="h" > <a name="79">79</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> p=>1, </td> </tr> <tr> <td class="h" > <a name="80">80</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> GV=>{}, </td> </tr> <tr> <td class="h" > <a name="81">81</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> PC=>0, </td> </tr> <tr> <td class="h" > <a name="82">82</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Stk=>[],}; </td> </tr> <tr> <td class="h" > <a name="83">83</a> </td> <td class="c0" > <a href="#84"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> bless $self,$class; </td> </tr> <tr> <td class="h" > <a name="84">84</a> </td> <td class="c0" > <a href="#85"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->clear; # initiallises canvas to blank </td> </tr> <tr> <td class="h" > <a name="85">85</a> </td> <td class="c0" > <a href="#99"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $self; </td> </tr> <tr> <td class="h" > <a name="86">86</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="87">87</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="88">88</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="89">89</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>draw()> , C<$canvas-E<gt>draw($row, $column)> </td> </tr> <tr> <td class="h" > <a name="90">90</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="91">91</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Draws the canvas to the terminal window. Optional row and column </td> </tr> <tr> <td class="h" > <a name="92">92</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> parameters may be passed to position the displayed canvas. If </td> </tr> <tr> <td class="h" > <a name="93">93</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> borderStyle is specified, the border is drawn, If title is specified </td> </tr> <tr> <td class="h" > <a name="94">94</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> this is added to the top border </td> </tr> <tr> <td class="h" > <a name="95">95</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="96">96</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="97">97</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="98">98</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub draw{ </td> </tr> <tr> <td class="h" > <a name="99">99</a> </td> <td class="c0" > <a href="#100"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#99-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#99-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($self,$top,$left)=@_; # the location on the screen can be overridden by passing row coloum position </td> </tr> <tr> <td class="h" > <a name="100">100</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#100-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $top//=$self->{top};$left//=$self->{left}; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#101"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="101">101</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> border($top-1,$left-1,$top+@{$self->{grid}}-1,$left+@{$self->{grid}->[0]}, </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#104"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="102">102</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{borderStyle},$self->{borderColour}, </td> </tr> <tr> <td class="h" > <a name="103">103</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{title},$self->{titleColour}) </td> </tr> <tr> <td class="h" > <a name="104">104</a> </td> <td class="c0" > <a href="#105"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#104-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#104-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ((defined $self->{borderStyle})&&(ref $self->{grid} eq "ARRAY")); </td> </tr> <tr> <td class="h" > <a name="105">105</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> printAt($top,$left, [reverse @{$self->{grid}}]); </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#106"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="106">106</a> </td> <td class="c0" > <a href="#118"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print colour("reset"); </td> </tr> <tr> <td class="h" > <a name="107">107</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="108">108</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="109">109</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="110">110</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>as_string()> </td> </tr> <tr> <td class="h" > <a name="111">111</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="112">112</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Returns the string containing the canvas of utf8 braille symbols, rows </td> </tr> <tr> <td class="h" > <a name="113">113</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> being separated by newline. </td> </tr> <tr> <td class="h" > <a name="114">114</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="115">115</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="116">116</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="117">117</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub as_string{ </td> </tr> <tr> <td class="h" > <a name="118">118</a> </td> <td class="c0" > <a href="#119"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#118-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#118-1"> 1 </a> </td> <td >   </td> <td class="s"> my $self=shift; </td> </tr> <tr> <td class="h" > <a name="119">119</a> </td> <td class="c0" > <a href="#120"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $str=""; </td> </tr> <tr> <td class="h" > <a name="120">120</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $str.=join("",@$_)."\n" foreach (reverse @{$self->{grid}}); </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#121"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="121">121</a> </td> <td class="c0" > <a href="#132"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $str; </td> </tr> <tr> <td class="h" > <a name="122">122</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="123">123</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="124">124</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>set($x,$y,$pixelValue)> </td> </tr> <tr> <td class="h" > <a name="125">125</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="126">126</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Sets a particular pixel on (default if C<$pixelValue> not sent) or off. </td> </tr> <tr> <td class="h" > <a name="127">127</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="128">128</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="129">129</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="130">130</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # this function creates a callback for plotting pixels directly </td> </tr> <tr> <td class="h" > <a name="131">131</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub BresenhamPlot{ </td> </tr> <tr> <td class="h" > <a name="132">132</a> </td> <td class="c0" > <a href="#133"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#132-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#132-1"> 0 </a> </td> <td >   </td> <td class="s"> my($x,$y,$args)=@_; </td> </tr> <tr> <td class="h" > <a name="133">133</a> </td> <td class="c0" > <a href="#134"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($canvas,$value)=(@$args); </td> </tr> <tr> <td class="h" > <a name="134">134</a> </td> <td class="c0" > <a href="#139"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> set($canvas,$x,$y,$value); </td> </tr> <tr> <td class="h" > <a name="135">135</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="136">136</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="137">137</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub set{ </td> </tr> <tr> <td class="h" > <a name="138">138</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#138-1"> 1 </a> </td> <td >   </td> <td > 7 </td> <td class="s"> use integer; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 5 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="139">139</a> </td> <td class="c0" > <a href="#140"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#139-1"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#139-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#139-1"> 1 </a> </td> <td >   </td> <td class="s"> push @_, 1 if @_ == 3; </td> </tr> <tr> <td class="h" > <a name="140">140</a> </td> <td class="c0" > <a href="#142"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($self,$x,$y,$value)=@_; </td> </tr> <tr> <td class="h" > <a name="141">141</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #exit if out of bounds </td> </tr> <tr> <td class="h" > <a name="142">142</a> </td> <td class="c0" > <a href="#144"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#142-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#142-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return unless(($x<$self->{width})&&($x>=0)&&($y<$self->{height})&&($y>=0)); </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#-3"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="143">143</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #convert coordinates to character / pixel offset position </td> </tr> <tr> <td class="h" > <a name="144">144</a> </td> <td class="c0" > <a href="#146"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($chrX,$chrY,$xOffset,$yOffset)=$self->charOffset($x,$y); </td> </tr> <tr> <td class="h" > <a name="145">145</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="146">146</a> </td> <td class="c0" > <a href="#147"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $bChr=chop($self->{grid}->[$chrY]->[$chrX]); </td> </tr> <tr> <td class="h" > <a name="147">147</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#147-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($value=~/^[a-z]/){$self->{grid}->[$chrY]->[$chrX]=colour($value);} </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#148"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="148">148</a> </td> <td class="c0" > <a href="#150"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> elsif ($value=~/^\033\[/){$self->{grid}->[$chrY]->[$chrX]=$value;} </td> </tr> <tr> <td class="h" > <a name="149">149</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # ensure character is a braille character to start with </td> </tr> <tr> <td class="h" > <a name="150">150</a> </td> <td class="c0" > <a href="#154"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#150-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $bChr='⠀' if (ord($bChr)&0x2800 !=0x2800); </td> </tr> <tr> <td class="h" > <a name="151">151</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="152">152</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{grid}->[$chrY]->[$chrX].=$value? # if $value is false, unset, or else set pixel </td> </tr> <tr> <td class="h" > <a name="153">153</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> (chr( ord($self->{setPix} -> [$xOffset]->[$yOffset]) | ord($bChr) ) ): </td> </tr> <tr> <td class="h" > <a name="154">154</a> </td> <td class="c0" > <a href="#163"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#154-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> (chr( ord($self->{unsetPix}-> [$xOffset]->[$yOffset]) & ord($bChr))); </td> </tr> <tr> <td class="h" > <a name="155">155</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="156">156</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="157">157</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>unset($x,$y)> </td> </tr> <tr> <td class="h" > <a name="158">158</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="159">159</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Sets the pixel value at C<$x,$y> to blank </td> </tr> <tr> <td class="h" > <a name="160">160</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="161">161</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="162">162</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub unset{ </td> </tr> <tr> <td class="h" > <a name="163">163</a> </td> <td class="c0" > <a href="#164"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#163-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#163-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($self,$x,$y)=@_; </td> </tr> <tr> <td class="h" > <a name="164">164</a> </td> <td class="c0" > <a href="#170"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->set($x,$y,0); </td> </tr> <tr> <td class="h" > <a name="165">165</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="166">166</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="167">167</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub charOffset{ # gets the character grid position and offset within that character </td> </tr> <tr> <td class="h" > <a name="168">168</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # give the pixel position </td> </tr> <tr> <td class="h" > <a name="169">169</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#169-1"> 1 </a> </td> <td >   </td> <td > 304 </td> <td class="s"> use integer; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 15 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="170">170</a> </td> <td class="c0" > <a href="#171"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#170-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#170-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($self,$x,$y)=@_; </td> </tr> <tr> <td class="h" > <a name="171">171</a> </td> <td class="c0" > <a href="#172"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#171-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#171-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return -1 unless(($x<$self->{width})&&($x>=0)&&($y<$self->{height})&&($y>=0)); </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#-3"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="172">172</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $chrX=$x/2;my $xOffset=$x- $chrX*2; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#173"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="173">173</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $chrY=$y/4;my $yOffset=$y- $chrY*4; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#174"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="174">174</a> </td> <td class="c0" > <a href="#184"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return ($chrX,$chrY,$xOffset,$yOffset); </td> </tr> <tr> <td class="h" > <a name="175">175</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="176">176</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="177">177</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="178">178</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>pixel($x,$y)> </td> </tr> <tr> <td class="h" > <a name="179">179</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="180">180</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Gets the pixel value at C<$x,$y> </td> </tr> <tr> <td class="h" > <a name="181">181</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="182">182</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="183">183</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub pixel{ #get pixel value at coordinates </td> </tr> <tr> <td class="h" > <a name="184">184</a> </td> <td class="c0" > <a href="#187"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#184-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#184-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($self,$x,$y,$value)=@_; </td> </tr> <tr> <td class="h" > <a name="185">185</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="186">186</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #exit if out of bounds </td> </tr> <tr> <td class="h" > <a name="187">187</a> </td> <td class="c0" > <a href="#190"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#187-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#187-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return unless(($x<($self->{width}-1))&&($x>=0)&&($y<($self->{height}-1))&&($x>=0)); </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#-3"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="188">188</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="189">189</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #convert coordinates to character / pixel offset position </td> </tr> <tr> <td class="h" > <a name="190">190</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $chrX=$x/2;my $xOffset=$x- $chrX*2; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#191"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="191">191</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $chrY=$y/4;my $yOffset=$y- $chrY*4; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#192"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="192">192</a> </td> <td class="c0" > <a href="#193"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $orOp=ord($self->{setPix}-> [$xOffset]->[$yOffset]) & ord($self->{grid}->[$chrY]->[$chrX]); </td> </tr> <tr> <td class="h" > <a name="193">193</a> </td> <td class="c0" > <a href="#202"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#193-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $orOp == ord('⠀')?0:1; </td> </tr> <tr> <td class="h" > <a name="194">194</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="195">195</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="196">196</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>clear()> </td> </tr> <tr> <td class="h" > <a name="197">197</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="198">198</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Re-initialises the canvas with blank braille characters </td> </tr> <tr> <td class="h" > <a name="199">199</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="200">200</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="201">201</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub clear{ </td> </tr> <tr> <td class="h" > <a name="202">202</a> </td> <td class="c0" > <a href="#203"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#202-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#202-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($self,$x1,$y1,$x2,$y2)=@_; </td> </tr> <tr> <td class="h" > <a name="203">203</a> </td> <td class="c0" > <a href="#204"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#203-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if(@_<2){ </td> </tr> <tr> <td class="h" > <a name="204">204</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#204-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{grid}=[map {[( '⠀')x ($self->{width}/2+($self->{width}%2?1:0))]}(0..($self->{height}/4+($self->{height}%4?1:0)))] </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#207"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="205">205</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="206">206</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else{ </td> </tr> <tr> <td class="h" > <a name="207">207</a> </td> <td class="c0" > <a href="#208"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#207-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @xr=$x1>$x2?($x2..$x1):($x1..$x2); </td> </tr> <tr> <td class="h" > <a name="208">208</a> </td> <td class="c0" > <a href="#209"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#208-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @yr=$y1>$y2?($y2..$y1):($y1..$y2); </td> </tr> <tr> <td class="h" > <a name="209">209</a> </td> <td class="c0" > <a href="#210"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $y(@yr){ </td> </tr> <tr> <td class="h" > <a name="210">210</a> </td> <td class="c0" > <a href="#211"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $x(@xr){ </td> </tr> <tr> <td class="h" > <a name="211">211</a> </td> <td class="c0" > <a href="#230"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{grid}->[$y]->[$x]='⠀'; </td> </tr> <tr> <td class="h" > <a name="212">212</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="213">213</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="214">214</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="215">215</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="216">216</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="217">217</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="218">218</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="219">219</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Pixel plotting primitives for shapes using Bresenham (Algorithm::Line::Bresenham) </td> </tr> <tr> <td class="h" > <a name="220">220</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="221">221</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>line($x1,$y1,$x2,$y2,$value)> </td> </tr> <tr> <td class="h" > <a name="222">222</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="223">223</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Uses Algorithm::Line::Bresenham to draw a line from C<$x1,$y1> to C<$x2,$y2>. </td> </tr> <tr> <td class="h" > <a name="224">224</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The optional value C<$value> sets or unsets the pixels. If C<$value> is a </td> </tr> <tr> <td class="h" > <a name="225">225</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> valid colour (see below) the line will be drawn with that colour. </td> </tr> <tr> <td class="h" > <a name="226">226</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="227">227</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="228">228</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="229">229</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub line{ </td> </tr> <tr> <td class="h" > <a name="230">230</a> </td> <td class="c0" > <a href="#231"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#230-1"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#230-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#230-1"> 1 </a> </td> <td >   </td> <td class="s"> push @_, 1 if @_ == 5; # final optional parameter is set to one if not given </td> </tr> <tr> <td class="h" > <a name="231">231</a> </td> <td class="c0" > <a href="#232"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($self,$x1,$y1,$x2,$y2,$value)=@_; </td> </tr> <tr> <td class="h" > <a name="232">232</a> </td> <td class="c0" > <a href="#233"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $setRef=\&Term::Graille::BresenhamPlot; </td> </tr> <tr> <td class="h" > <a name="233">233</a> </td> <td class="c0" > <a href="#247"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @points=Algorithm::Line::Bresenham::line($x1,$y1,$x2,$y2,$setRef,[$self,$value]); </td> </tr> <tr> <td class="h" > <a name="234">234</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="235">235</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="236">236</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="237">237</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>circle($x1,$y1,$radius,$value)> </td> </tr> <tr> <td class="h" > <a name="238">238</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="239">239</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Uses Algorithm::Line::Bresenham to draw a circle centered at C<$x1,$y1> </td> </tr> <tr> <td class="h" > <a name="240">240</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> with radius C<$radius> to C<$x2,$y2>. </td> </tr> <tr> <td class="h" > <a name="241">241</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The optional value C<$value> sets or unsets the pixels. If C<$value> is a </td> </tr> <tr> <td class="h" > <a name="242">242</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> valid colour (see below) the line will be drawn with that colour. </td> </tr> <tr> <td class="h" > <a name="243">243</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="244">244</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="245">245</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="246">246</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub circle{ </td> </tr> <tr> <td class="h" > <a name="247">247</a> </td> <td class="c0" > <a href="#248"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#247-1"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#247-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#247-1"> 1 </a> </td> <td >   </td> <td class="s"> push @_, 1 if @_ == 4; </td> </tr> <tr> <td class="h" > <a name="248">248</a> </td> <td class="c0" > <a href="#249"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($self,$x1,$y1,$radius,$value)=@_; </td> </tr> <tr> <td class="h" > <a name="249">249</a> </td> <td class="c0" > <a href="#250"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @points=Algorithm::Line::Bresenham::circle($x1,$y1,$radius); </td> </tr> <tr> <td class="h" > <a name="250">250</a> </td> <td class="c0" > <a href="#264"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->set(@$_,$value) foreach (@points); </td> </tr> <tr> <td class="h" > <a name="251">251</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="252">252</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="253">253</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="254">254</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>ellipse_rect($x1,$y1,$x2,$y2,$value)> </td> </tr> <tr> <td class="h" > <a name="255">255</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="256">256</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Uses Algorithm::Line::Bresenham to draw a rectangular ellipse, (an </td> </tr> <tr> <td class="h" > <a name="257">257</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ellipse bounded by a rectangle defined by C<$x1,$y1,$x2,$y2>). </td> </tr> <tr> <td class="h" > <a name="258">258</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The optional value C<$value> sets or unsets the pixels. If C<$value> is a </td> </tr> <tr> <td class="h" > <a name="259">259</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> valid colour (see below) the line will be drawn with that colour. </td> </tr> <tr> <td class="h" > <a name="260">260</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="261">261</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="262">262</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="263">263</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub ellipse_rect{ </td> </tr> <tr> <td class="h" > <a name="264">264</a> </td> <td class="c0" > <a href="#265"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#264-1"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#264-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#264-1"> 1 </a> </td> <td >   </td> <td class="s"> push @_, 1 if @_ == 5; </td> </tr> <tr> <td class="h" > <a name="265">265</a> </td> <td class="c0" > <a href="#266"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($self,$x1,$y1,$x2,$y2,$value)=@_; </td> </tr> <tr> <td class="h" > <a name="266">266</a> </td> <td class="c0" > <a href="#267"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @points=Algorithm::Line::Bresenham::ellipse_rect($x1,$y1,$x2,$y2); </td> </tr> <tr> <td class="h" > <a name="267">267</a> </td> <td class="c0" > <a href="#281"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->set(@$_,$value) foreach (@points); </td> </tr> <tr> <td class="h" > <a name="268">268</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="269">269</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="270">270</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>quad_bezier($x1,$y1,$x2,$y2,$x3,$y3,$value)> </td> </tr> <tr> <td class="h" > <a name="271">271</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="272">272</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Uses Algorithm::Line::Bresenham to draw a quadratic bezier, defined by </td> </tr> <tr> <td class="h" > <a name="273">273</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> end points C<$x1,$y1,$x3,$y3>) and control point C<$x2,$y2>. </td> </tr> <tr> <td class="h" > <a name="274">274</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The optional value C<$value> sets or unsets the pixels. If C<$value> is a </td> </tr> <tr> <td class="h" > <a name="275">275</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> valid colour (see below) the line will be drawn with that colour. </td> </tr> <tr> <td class="h" > <a name="276">276</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="277">277</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="278">278</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="279">279</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="280">280</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub quad_bezier{ </td> </tr> <tr> <td class="h" > <a name="281">281</a> </td> <td class="c0" > <a href="#282"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#281-1"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#281-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#281-1"> 1 </a> </td> <td >   </td> <td class="s"> push @_, 1 if @_ == 7; </td> </tr> <tr> <td class="h" > <a name="282">282</a> </td> <td class="c0" > <a href="#283"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($self,$x1,$y1,$x2,$y2,$x3,$y3,$value)=@_; </td> </tr> <tr> <td class="h" > <a name="283">283</a> </td> <td class="c0" > <a href="#284"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @points=Algorithm::Line::Bresenham::quad_bezier($x1,$y1,$x2,$y2,$x3,$y3); </td> </tr> <tr> <td class="h" > <a name="284">284</a> </td> <td class="c0" > <a href="#299"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->set(@$_,$value) foreach (@points); </td> </tr> <tr> <td class="h" > <a name="285">285</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="286">286</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="287">287</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="288">288</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>thick_line($x1,$y1,$x2,$y2,$thickness,$value)> </td> </tr> <tr> <td class="h" > <a name="289">289</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="290">290</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Uses Algorithm::Line::Bresenham to draw a thick line, defined by </td> </tr> <tr> <td class="h" > <a name="291">291</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> end points C<$x1,$y1,$x2,$y2>) and thickness C<$thickness>. </td> </tr> <tr> <td class="h" > <a name="292">292</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The optional value C<$value> sets or unsets the pixels. If C<$value> is a </td> </tr> <tr> <td class="h" > <a name="293">293</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> valid colour (see below) the line will be drawn with that colour. </td> </tr> <tr> <td class="h" > <a name="294">294</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="295">295</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="296">296</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="297">297</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="298">298</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub thick_line{ </td> </tr> <tr> <td class="h" > <a name="299">299</a> </td> <td class="c0" > <a href="#300"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#299-1"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#299-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#299-1"> 1 </a> </td> <td >   </td> <td class="s"> push @_, 1 if @_ == 6; </td> </tr> <tr> <td class="h" > <a name="300">300</a> </td> <td class="c0" > <a href="#301"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($self,$x0,$y0,$x1,$y1,$thickness,$value)=@_; </td> </tr> <tr> <td class="h" > <a name="301">301</a> </td> <td class="c0" > <a href="#302"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @points=Algorithm::Line::Bresenham::thick_line($x0,$y0,$x1,$y1,$thickness); </td> </tr> <tr> <td class="h" > <a name="302">302</a> </td> <td class="c0" > <a href="#321"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->set(@$_,$value) foreach (@points); </td> </tr> <tr> <td class="h" > <a name="303">303</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="304">304</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="305">305</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="306">306</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>varthick_line($x0,$y0,$x1,$y1, </td> </tr> <tr> <td class="h" > <a name="307">307</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $left,$argL, </td> </tr> <tr> <td class="h" > <a name="308">308</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $right,$argR, $value)=@_; </td> </tr> <tr> <td class="h" > <a name="309">309</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="310">310</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Uses Algorithm::Line::Bresenham to draw a variable thickness, defined by </td> </tr> <tr> <td class="h" > <a name="311">311</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> end points C<$x0,$y0,$x1,$y1>) and thickness defined by two user defined </td> </tr> <tr> <td class="h" > <a name="312">312</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> functions, each function taking as arguments C<argE<lt>L|RE<gt>, $pos, $len> </td> </tr> <tr> <td class="h" > <a name="313">313</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> and returning thickness of the left and right sides </td> </tr> <tr> <td class="h" > <a name="314">314</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> of the line. The optional value C<$value> sets or unsets the pixels. </td> </tr> <tr> <td class="h" > <a name="315">315</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> If C<$value> is a valid colour (see below) the line will be drawn with that colour. </td> </tr> <tr> <td class="h" > <a name="316">316</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="317">317</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="318">318</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="319">319</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="320">320</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub varthick_line{ </td> </tr> <tr> <td class="h" > <a name="321">321</a> </td> <td class="c0" > <a href="#322"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#321-1"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#321-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#321-1"> 1 </a> </td> <td >   </td> <td class="s"> push @_, 1 if @_ == 9; </td> </tr> <tr> <td class="h" > <a name="322">322</a> </td> <td class="c0" > <a href="#323"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($self,$x0,$y0,$x1,$y1,$left,$argL,$right,$argR,$value)=@_; </td> </tr> <tr> <td class="h" > <a name="323">323</a> </td> <td class="c0" > <a href="#324"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @points=Algorithm::Line::Bresenham::varthick_line($x0,$y0,$x1,$y1,$left,$argL,$right,$argR); </td> </tr> <tr> <td class="h" > <a name="324">324</a> </td> <td class="c0" > <a href="#341"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->set(@$_,$value) foreach (@points); </td> </tr> <tr> <td class="h" > <a name="325">325</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="326">326</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="327">327</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="328">328</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="329">329</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="330">330</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>polyline($x1,$y1,....,$xn,$yn,$value)> </td> </tr> <tr> <td class="h" > <a name="331">331</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="332">332</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Uses Algorithm::Line::Bresenham to draw a poly line, form a </td> </tr> <tr> <td class="h" > <a name="333">333</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sequences of points. </td> </tr> <tr> <td class="h" > <a name="334">334</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The optional value C<$value> sets or unsets the pixels. If C<$value> is a </td> </tr> <tr> <td class="h" > <a name="335">335</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> valid colour (see below) the line will be drawn with that colour. </td> </tr> <tr> <td class="h" > <a name="336">336</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="337">337</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="338">338</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="339">339</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="340">340</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub polyline{ </td> </tr> <tr> <td class="h" > <a name="341">341</a> </td> <td class="c0" > <a href="#342"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#341-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#341-1"> 1 </a> </td> <td >   </td> <td class="s"> my $self=shift; </td> </tr> <tr> <td class="h" > <a name="342">342</a> </td> <td class="c0" > <a href="#343"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @vertices=@_; </td> </tr> <tr> <td class="h" > <a name="343">343</a> </td> <td class="c0" > <a href="#344"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#343-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $value= pop @vertices if (scalar @vertices & 1); </td> </tr> <tr> <td class="h" > <a name="344">344</a> </td> <td class="c0" > <a href="#345"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#344-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $value//=1; </td> </tr> <tr> <td class="h" > <a name="345">345</a> </td> <td class="c0" > <a href="#346"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @points=Algorithm::Line::Bresenham::polyline(@vertices); </td> </tr> <tr> <td class="h" > <a name="346">346</a> </td> <td class="c0" > <a href="#350"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->set(@$_,$value) foreach (@points); </td> </tr> <tr> <td class="h" > <a name="347">347</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="348">348</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="349">349</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub degToRad{ </td> </tr> <tr> <td class="h" > <a name="350">350</a> </td> <td class="c0" > <a href="#366"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#350-1"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#350-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#350-1"> 0 </a> </td> <td >   </td> <td class="s"> return $_[0]?3.14159267*$_[0]/180:0; ; </td> </tr> <tr> <td class="h" > <a name="351">351</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="352">352</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="353">353</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 Character Level Functions; </td> </tr> <tr> <td class="h" > <a name="354">354</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="355">355</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>scroll($direction,$wrap)> </td> </tr> <tr> <td class="h" > <a name="356">356</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="357">357</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Scrolls in C<$direction>. $direction may be </td> </tr> <tr> <td class="h" > <a name="358">358</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "l", "left", "r","right", "u","up","d", "down". </td> </tr> <tr> <td class="h" > <a name="359">359</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Beacuse of the use of Braille characters, up/down scrolling is 4 pixels </td> </tr> <tr> <td class="h" > <a name="360">360</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> at a time, whereas left right scrolling is 2 pixels at a time. If </td> </tr> <tr> <td class="h" > <a name="361">361</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<$wrap> is a true value, the screen wraps around. </td> </tr> <tr> <td class="h" > <a name="362">362</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="363">363</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="364">364</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="365">365</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub scroll{ </td> </tr> <tr> <td class="h" > <a name="366">366</a> </td> <td class="c0" > <a href="#367"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#366-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#366-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($self,$direction,$wrap,$numberOfChar)=@_; </td> </tr> <tr> <td class="h" > <a name="367">367</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#367-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $numberOfChar//=1;$wrap//=0; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#368"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="368">368</a> </td> <td class="c0" > <a href="#369"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> for($direction){ </td> </tr> <tr> <td class="h" > <a name="369">369</a> </td> <td class="c0" > <a href="#370"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#369-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> /^r/i && do{ </td> </tr> <tr> <td class="h" > <a name="370">370</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $row (0..$#{$self->{grid}}){ </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#371"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="371">371</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @r=@{$self->{grid}->[$row]}; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#372"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="372">372</a> </td> <td class="c0" > <a href="#373"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $end=pop(@r); </td> </tr> <tr> <td class="h" > <a name="373">373</a> </td> <td class="c0" > <a href="#374"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#373-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> unshift(@r,$wrap?$end:'⠀'); </td> </tr> <tr> <td class="h" > <a name="374">374</a> </td> <td class="c0" > <a href="#376"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{grid}->[$row]=\@r; </td> </tr> <tr> <td class="h" > <a name="375">375</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="376">376</a> </td> <td class="c0" > <a href="#379"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="377">377</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="378">378</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="379">379</a> </td> <td class="c0" > <a href="#380"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#379-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> /^l/i && do{ </td> </tr> <tr> <td class="h" > <a name="380">380</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $row (0..$#{$self->{grid}}){ </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#381"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="381">381</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @r=@{$self->{grid}->[$row]}; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#382"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="382">382</a> </td> <td class="c0" > <a href="#383"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $end=shift(@r); </td> </tr> <tr> <td class="h" > <a name="383">383</a> </td> <td class="c0" > <a href="#384"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#383-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> push(@r,$wrap?$end:'⠀'); </td> </tr> <tr> <td class="h" > <a name="384">384</a> </td> <td class="c0" > <a href="#386"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{grid}->[$row]=\@r; </td> </tr> <tr> <td class="h" > <a name="385">385</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="386">386</a> </td> <td class="c0" > <a href="#389"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="387">387</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="388">388</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="389">389</a> </td> <td class="c0" > <a href="#390"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#389-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> /^d/i && do{ </td> </tr> <tr> <td class="h" > <a name="390">390</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @r=@{$self->{grid}}; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#391"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="391">391</a> </td> <td class="c0" > <a href="#392"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $end=shift(@r); </td> </tr> <tr> <td class="h" > <a name="392">392</a> </td> <td class="c0" > <a href="#393"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#392-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> push(@r,$wrap?$end:[('⠀')x ($self->{width}/2+($self->{width}%2?1:0))]); </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="393">393</a> </td> <td class="c0" > <a href="#394"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{grid}=\@r; </td> </tr> <tr> <td class="h" > <a name="394">394</a> </td> <td class="c0" > <a href="#397"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="395">395</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="396">396</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="397">397</a> </td> <td class="c0" > <a href="#398"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#397-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> /^u/i && do{ </td> </tr> <tr> <td class="h" > <a name="398">398</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @r=@{$self->{grid}}; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#399"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="399">399</a> </td> <td class="c0" > <a href="#400"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $end=pop(@r); </td> </tr> <tr> <td class="h" > <a name="400">400</a> </td> <td class="c0" > <a href="#401"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#400-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> unshift(@r,$wrap?$end:[('⠀')x ($self->{width}/2+($self->{width}%2?1:0))]); </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="401">401</a> </td> <td class="c0" > <a href="#402"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{grid}=\@r; </td> </tr> <tr> <td class="h" > <a name="402">402</a> </td> <td class="c0" > <a href="#416"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="403">403</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="404">404</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="405">405</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="406">406</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="407">407</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="408">408</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>blockBlit($block,$gridX, $gridY)> </td> </tr> <tr> <td class="h" > <a name="409">409</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="410">410</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Allows blitting a 2d arrays to a grid location in the canvas. Useful for </td> </tr> <tr> <td class="h" > <a name="411">411</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> printing using a Graille font. </td> </tr> <tr> <td class="h" > <a name="412">412</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="413">413</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="414">414</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="415">415</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub blockBlit{ # needs protection </td> </tr> <tr> <td class="h" > <a name="416">416</a> </td> <td class="c0" > <a href="#417"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#416-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#416-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($self, $blk, $gridX, $gridY)=@_; </td> </tr> <tr> <td class="h" > <a name="417">417</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> for my $x(0..$#{$blk->[0]}){ </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#418"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="418">418</a> </td> <td class="c0" > <a href="#419"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> for my $y(0..$#$blk){ </td> </tr> <tr> <td class="h" > <a name="419">419</a> </td> <td class="c0" > <a href="#437"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{grid}->[$gridY+$y]->[$gridX+$x]=$blk->[$#$blk-$y]->[$x] </td> </tr> <tr> <td class="h" > <a name="420">420</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="421">421</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="422">422</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="423">423</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="424">424</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="425">425</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>exportCanvas($filename)> , C<$canvas-E<gt>importCanvas($filename,[$toBuffer])> </td> </tr> <tr> <td class="h" > <a name="426">426</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="427">427</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> This allows the loading and unloading of a canvas from a file. There is </td> </tr> <tr> <td class="h" > <a name="428">428</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> no checking of the dimension of the canvas being imported at the moment. </td> </tr> <tr> <td class="h" > <a name="429">429</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Import can be direct to the canvas, the function return the loaded data </td> </tr> <tr> <td class="h" > <a name="430">430</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> as an ArrayRef, the optional c<$toBuffer> parameter, if true prevents </td> </tr> <tr> <td class="h" > <a name="431">431</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> loading the data onto the canvas. </td> </tr> <tr> <td class="h" > <a name="432">432</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="433">433</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="434">434</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="435">435</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="436">436</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub exportCanvas{ </td> </tr> <tr> <td class="h" > <a name="437">437</a> </td> <td class="c0" > <a href="#438"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#437-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#437-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($self,$file)=@_; </td> </tr> <tr> <td class="h" > <a name="438">438</a> </td> <td class="c0" > <a href="#439"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#438-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> open (my $fh, ">$file") or die "can not open $file for writing $!"; </td> </tr> <tr> <td class="h" > <a name="439">439</a> </td> <td class="c0" > <a href="#440"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> binmode($fh, ":utf8"); </td> </tr> <tr> <td class="h" > <a name="440">440</a> </td> <td class="c0" > <a href="#441"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $fh $self->as_string(); </td> </tr> <tr> <td class="h" > <a name="441">441</a> </td> <td class="c0" > <a href="#446"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> close $fh; </td> </tr> <tr> <td class="h" > <a name="442">442</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="443">443</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="444">444</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="445">445</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub importCanvas{ </td> </tr> <tr> <td class="h" > <a name="446">446</a> </td> <td class="c0" > <a href="#447"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#446-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#446-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($self,$file,$toBuffer)=@_; </td> </tr> <tr> <td class="h" > <a name="447">447</a> </td> <td class="c0" > <a href="#448"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#447-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> open (my $fh,'<', $file) or die "can not open $file for reading $!"; </td> </tr> <tr> <td class="h" > <a name="448">448</a> </td> <td class="c0" > <a href="#449"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @grd; </td> </tr> <tr> <td class="h" > <a name="449">449</a> </td> <td class="c0" > <a href="#450"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> while (<$fh>){ </td> </tr> <tr> <td class="h" > <a name="450">450</a> </td> <td class="c0" > <a href="#452"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#450-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last if (@grd > ($self->{height}/4)); # stop if too big for canvas </td> </tr> <tr> <td class="h" > <a name="451">451</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # extend if too narrow for canvas, trucate if too wide </td> </tr> <tr> <td class="h" > <a name="452">452</a> </td> <td class="c0" > <a href="#454"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> unshift @grd, [split(//,substr($_.('⠀')x($self->{width}/2),0,$self->{width}/2))]; </td> </tr> <tr> <td class="h" > <a name="453">453</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="454">454</a> </td> <td class="c0" > <a href="#455"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> close $fh; </td> </tr> <tr> <td class="h" > <a name="455">455</a> </td> <td class="c0" > <a href="#456"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#455-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{grid}=[@grd] unless $toBuffer; </td> </tr> <tr> <td class="h" > <a name="456">456</a> </td> <td class="c0" > <a href="#470"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return [@grd]; </td> </tr> <tr> <td class="h" > <a name="457">457</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="458">458</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="459">459</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>textAt($x,$y,$text,$fmt)> </td> </tr> <tr> <td class="h" > <a name="460">460</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="461">461</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Printing text on the C<$canvas>. This is different fromthe exported </td> </tr> <tr> <td class="h" > <a name="462">462</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<printAt()> function. the characters are printed on the C<$canvas> </td> </tr> <tr> <td class="h" > <a name="463">463</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> and may be scrolled with the canvas and will overwrite or be over written </td> </tr> <tr> <td class="h" > <a name="464">464</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> othe $canvas drawing actions. The optional C<$fmt> allows the setting of colour; </td> </tr> <tr> <td class="h" > <a name="465">465</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="466">466</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="467">467</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="468">468</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="469">469</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub textAt{ </td> </tr> <tr> <td class="h" > <a name="470">470</a> </td> <td class="c0" > <a href="#471"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#470-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#470-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($self,$x,$y,$text,$fmt)=@_; </td> </tr> <tr> <td class="h" > <a name="471">471</a> </td> <td class="c0" > <a href="#472"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($chrX,$chrY,$xOffset,$yOffset)=charOffset($self,$x,$y); </td> </tr> <tr> <td class="h" > <a name="472">472</a> </td> <td class="c0" > <a href="#473"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#472-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($chrX!=-1){ </td> </tr> <tr> <td class="h" > <a name="473">473</a> </td> <td class="c0" > <a href="#474"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @chrs=split(//,$text); </td> </tr> <tr> <td class="h" > <a name="474">474</a> </td> <td class="c0" > <a href="#475"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $lastChar=$chrX+(length $text)-1; </td> </tr> <tr> <td class="h" > <a name="475">475</a> </td> <td class="c0" > <a href="#476"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#475-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $lastChar = $self->{width}/2 if ($lastChar>$self->{width}/2); </td> </tr> <tr> <td class="h" > <a name="476">476</a> </td> <td class="c0" > <a href="#477"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#476-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $chrs[0]=colour($fmt).$chrs[0] if $fmt; </td> </tr> <tr> <td class="h" > <a name="477">477</a> </td> <td class="c0" > <a href="#478"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> for my $tc ($chrX..$lastChar){ </td> </tr> <tr> <td class="h" > <a name="478">478</a> </td> <td class="c0" > <a href="#485"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{grid}->[$chrY]->[$tc]=shift @chrs; </td> </tr> <tr> <td class="h" > <a name="479">479</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="480">480</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="481">481</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="482">482</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="483">483</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="484">484</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub resetUnpainted{ </td> </tr> <tr> <td class="h" > <a name="485">485</a> </td> <td class="c0" > <a href="#486"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#485-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#485-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($self,$chX,$chY)=@_; </td> </tr> <tr> <td class="h" > <a name="486">486</a> </td> <td class="c0" > <a href="#487"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#486-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#486-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return if (($chX>$self->{width}/2)||($chX<0)||($chY>$self->{height}/4)||($chY<0)); </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#-3"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="487">487</a> </td> <td class="c0" > <a href="#491"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#487-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{grid}->[$chY]->[$chX]=colour("reset").$self->{grid}->[$chY]->[$chX] if (length $self->{grid}->[$chY]->[$chX] ==1); </td> </tr> <tr> <td class="h" > <a name="488">488</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="489">489</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="490">490</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub stripColour{ </td> </tr> <tr> <td class="h" > <a name="491">491</a> </td> <td class="c0" > <a href="#492"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#491-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#491-1"> 0 </a> </td> <td >   </td> <td class="s"> my $ch=shift; </td> </tr> <tr> <td class="h" > <a name="492">492</a> </td> <td class="c0" > <a href="#496"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return chop $ch; </td> </tr> <tr> <td class="h" > <a name="493">493</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="494">494</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="495">495</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub axis{ </td> </tr> <tr> <td class="h" > <a name="496">496</a> </td> <td class="c0" > <a href="#497"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#496-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#496-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($self,$xOrigin,$yOrigin,$xPos,$xNeg,$yPos,$yNeg,$xTics,$yTics)=@_; </td> </tr> <tr> <td class="h" > <a name="497">497</a> </td> <td class="c0" > <a href="#498"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> for my $y ($yOrigin-$yNeg..$yOrigin+$yPos) { </td> </tr> <tr> <td class="h" > <a name="498">498</a> </td> <td class="c0" > <a href="#500"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->textAt($xOrigin,$y,'│'); </td> </tr> <tr> <td class="h" > <a name="499">499</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="500">500</a> </td> <td class="c0" > <a href="#501"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->textAt($xOrigin-$xNeg,$yOrigin,'─' x (($xNeg+$xPos)/2)); </td> </tr> <tr> <td class="h" > <a name="501">501</a> </td> <td class="c0" > <a href="#507"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->textAt($xOrigin,$yOrigin,'┼' ); </td> </tr> <tr> <td class="h" > <a name="502">502</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="503">503</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="504">504</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="505">505</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="506">506</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub axis2{ </td> </tr> <tr> <td class="h" > <a name="507">507</a> </td> <td class="c0" > <a href="#508"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#507-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#507-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($self,$xOrigin,$yOrigin,$xPos,$xNeg,$yPos,$yNeg,$xTics,$yTics)=@_; </td> </tr> <tr> <td class="h" > <a name="508">508</a> </td> <td class="c0" > <a href="#509"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->line($xOrigin-$xNeg,$yOrigin,$xOrigin+$xPos,$yOrigin); </td> </tr> <tr> <td class="h" > <a name="509">509</a> </td> <td class="c0" > <a href="#538"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->line($xOrigin,$yOrigin-$yNeg,$xOrigin,$yOrigin+$yPos); </td> </tr> <tr> <td class="h" > <a name="510">510</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="511">511</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="512">512</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="513">513</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 Enhancements </td> </tr> <tr> <td class="h" > <a name="514">514</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="515">515</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 C<$canvas-E<gt>logo($script)> </td> </tr> <tr> <td class="h" > <a name="516">516</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="517">517</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Interface to Graille's built in Turtle interpreter. </td> </tr> <tr> <td class="h" > <a name="518">518</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> A string is taken and split by senicolons or newlines into instructions. </td> </tr> <tr> <td class="h" > <a name="519">519</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The instructions are trimmed, and split by the first space character into </td> </tr> <tr> <td class="h" > <a name="520">520</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> command and parameters. Very simple in other words. No syntax checking </td> </tr> <tr> <td class="h" > <a name="521">521</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> is done </td> </tr> <tr> <td class="h" > <a name="522">522</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="523">523</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<"fd distance"> pen moves forward a certain distance. </td> </tr> <tr> <td class="h" > <a name="524">524</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<"lt angle">, C<"rt angle"> turns left or right. </td> </tr> <tr> <td class="h" > <a name="525">525</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<"bk distance"> pen moves back a certain distance. </td> </tr> <tr> <td class="h" > <a name="526">526</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<"pu">, C<"pd"> Pen is up or down, up means no drawing takes place, </td> </tr> <tr> <td class="h" > <a name="527">527</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> and down means the turtle draws as it moves. </td> </tr> <tr> <td class="h" > <a name="528">528</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<"dir"> set the direction at a specific angle in dgrees, </td> </tr> <tr> <td class="h" > <a name="529">529</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> with 0 being directly left. </td> </tr> <tr> <td class="h" > <a name="530">530</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<"mv">moves pen to specific coordinates without drawing. </td> </tr> <tr> <td class="h" > <a name="531">531</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<"ce"> centers the turtle in the middle of a canvas </td> </tr> <tr> <td class="h" > <a name="532">532</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<"sp"> allows animated drawing by specifiying the the number </td> </tr> <tr> <td class="h" > <a name="533">533</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> of centiseconds between instructions </td> </tr> <tr> <td class="h" > <a name="534">534</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="535">535</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="536">536</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="537">537</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub logo{ </td> </tr> <tr> <td class="h" > <a name="538">538</a> </td> <td class="c0" > <a href="#539"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#538-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#538-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($self,$script)=@_; </td> </tr> <tr> <td class="h" > <a name="539">539</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @commands= map{s/^\s+|\s+$//g; $_}split(/[\n;]+/,$script); </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#540"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="540">540</a> </td> <td class="c0" > <a href="#541"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $instr (@commands){ </td> </tr> <tr> <td class="h" > <a name="541">541</a> </td> <td class="c0" > <a href="#542"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#541-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> next unless $instr; </td> </tr> <tr> <td class="h" > <a name="542">542</a> </td> <td class="c0" > <a href="#543"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#542-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> next if ($instr=~/#/); </td> </tr> <tr> <td class="h" > <a name="543">543</a> </td> <td class="c0" > <a href="#544"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($c,$p)=split(/[\s]+/,$instr,2); </td> </tr> <tr> <td class="h" > <a name="544">544</a> </td> <td class="c0" > <a href="#545"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#544-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @pars=split(/,/,$p) if $p; </td> </tr> <tr> <td class="h" > <a name="545">545</a> </td> <td class="c0" > <a href="#546"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> for ($c){ </td> </tr> <tr> <td class="h" > <a name="546">546</a> </td> <td class="c0" > <a href="#547"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#546-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> /^(fd|forward)/ && do{ </td> </tr> <tr> <td class="h" > <a name="547">547</a> </td> <td class="c0" > <a href="#548"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#547-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#547-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last unless ($pars[0] && (0+$pars[0])); </td> </tr> <tr> <td class="h" > <a name="548">548</a> </td> <td class="c0" > <a href="#549"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $x=$self->{logoVars}->{x}+$pars[0]*cos(degToRad($self->{logoVars}->{d})); </td> </tr> <tr> <td class="h" > <a name="549">549</a> </td> <td class="c0" > <a href="#550"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $y=$self->{logoVars}->{y}+$pars[0]*sin(degToRad($self->{logoVars}->{d})); </td> </tr> <tr> <td class="h" > <a name="550">550</a> </td> <td class="c0" > <a href="#551"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#550-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($self->{logoVars}->{p}){ </td> </tr> <tr> <td class="h" > <a name="551">551</a> </td> <td class="c0" > <a href="#553"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#551-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->line($self->{logoVars}->{x},$self->{logoVars}->{y},$x,$y,($self->{logoVars}->{c}//1)) </td> </tr> <tr> <td class="h" > <a name="552">552</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="553">553</a> </td> <td class="c0" > <a href="#554"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}->{y}=$y; </td> </tr> <tr> <td class="h" > <a name="554">554</a> </td> <td class="c0" > <a href="#555"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}->{x}=$x; </td> </tr> <tr> <td class="h" > <a name="555">555</a> </td> <td class="c0" > <a href="#557"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="556">556</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="557">557</a> </td> <td class="c0" > <a href="#558"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#557-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> /^(lt|left)/ && do{ </td> </tr> <tr> <td class="h" > <a name="558">558</a> </td> <td class="c0" > <a href="#559"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#558-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#558-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last unless ($pars[0] && (0+$pars[0])); </td> </tr> <tr> <td class="h" > <a name="559">559</a> </td> <td class="c0" > <a href="#560"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}->{d}+=$pars[0]; </td> </tr> <tr> <td class="h" > <a name="560">560</a> </td> <td class="c0" > <a href="#561"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}->{d}-=360 while($self->{logoVars}->{d}>360); </td> </tr> <tr> <td class="h" > <a name="561">561</a> </td> <td class="c0" > <a href="#563"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="562">562</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="563">563</a> </td> <td class="c0" > <a href="#564"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#563-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> /^(rt|right)/ && do{ </td> </tr> <tr> <td class="h" > <a name="564">564</a> </td> <td class="c0" > <a href="#565"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#564-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#564-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last unless ($pars[0] && (0+$pars[0])); </td> </tr> <tr> <td class="h" > <a name="565">565</a> </td> <td class="c0" > <a href="#566"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}->{d}-=$pars[0]; </td> </tr> <tr> <td class="h" > <a name="566">566</a> </td> <td class="c0" > <a href="#567"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}->{d}+=360 while($self->{logoVars}->{d}<360); </td> </tr> <tr> <td class="h" > <a name="567">567</a> </td> <td class="c0" > <a href="#569"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="568">568</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="569">569</a> </td> <td class="c0" > <a href="#570"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#569-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> /^(bk|back)/ && do{ </td> </tr> <tr> <td class="h" > <a name="570">570</a> </td> <td class="c0" > <a href="#571"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $pars[0]=-$pars[0]; </td> </tr> <tr> <td class="h" > <a name="571">571</a> </td> <td class="c0" > <a href="#572"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $_="fd"; </td> </tr> <tr> <td class="h" > <a name="572">572</a> </td> <td class="c0" > <a href="#574"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> redo; </td> </tr> <tr> <td class="h" > <a name="573">573</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="574">574</a> </td> <td class="c0" > <a href="#575"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#574-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> /^pu/ && do{ </td> </tr> <tr> <td class="h" > <a name="575">575</a> </td> <td class="c0" > <a href="#576"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}->{p}=0; </td> </tr> <tr> <td class="h" > <a name="576">576</a> </td> <td class="c0" > <a href="#578"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="577">577</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="578">578</a> </td> <td class="c0" > <a href="#579"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#578-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> /^pd/ && do{ </td> </tr> <tr> <td class="h" > <a name="579">579</a> </td> <td class="c0" > <a href="#580"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}->{p}=1; </td> </tr> <tr> <td class="h" > <a name="580">580</a> </td> <td class="c0" > <a href="#582"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="581">581</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="582">582</a> </td> <td class="c0" > <a href="#583"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#582-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> /^pc/ && do{ </td> </tr> <tr> <td class="h" > <a name="583">583</a> </td> <td class="c0" > <a href="#584"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}->{c}=colour($pars[0]); </td> </tr> <tr> <td class="h" > <a name="584">584</a> </td> <td class="c0" > <a href="#586"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="585">585</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="586">586</a> </td> <td class="c0" > <a href="#587"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#586-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> /^dir/ && do{ </td> </tr> <tr> <td class="h" > <a name="587">587</a> </td> <td class="c0" > <a href="#588"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}->{d}=$pars[0]; </td> </tr> <tr> <td class="h" > <a name="588">588</a> </td> <td class="c0" > <a href="#590"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="589">589</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="590">590</a> </td> <td class="c0" > <a href="#591"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#590-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> /^mv/ && do{ </td> </tr> <tr> <td class="h" > <a name="591">591</a> </td> <td class="c0" > <a href="#592"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}->{x}=$pars[0]; </td> </tr> <tr> <td class="h" > <a name="592">592</a> </td> <td class="c0" > <a href="#593"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}->{y}=$pars[1 ]; </td> </tr> <tr> <td class="h" > <a name="593">593</a> </td> <td class="c0" > <a href="#595"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="594">594</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="595">595</a> </td> <td class="c0" > <a href="#596"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#595-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> /^ce/ && do{ </td> </tr> <tr> <td class="h" > <a name="596">596</a> </td> <td class="c0" > <a href="#597"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}->{x}=$self->{width}/2; </td> </tr> <tr> <td class="h" > <a name="597">597</a> </td> <td class="c0" > <a href="#598"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}->{y}=$self->{height}/2; </td> </tr> <tr> <td class="h" > <a name="598">598</a> </td> <td class="c0" > <a href="#600"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="599">599</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="600">600</a> </td> <td class="c0" > <a href="#601"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#600-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> /^sp/ && do{ </td> </tr> <tr> <td class="h" > <a name="601">601</a> </td> <td class="c0" > <a href="#603"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{logoVars}->{sp}=$pars[0]; </td> </tr> <tr> <td class="h" > <a name="602">602</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> last </td> </tr> <tr> <td class="h" > <a name="603">603</a> </td> <td class="c0" > <a href="#607"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="604">604</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="605">605</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="606">606</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="607">607</a> </td> <td class="c0" > <a href="#608"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#607-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (defined $self->{logoVars}->{sp}){ </td> </tr> <tr> <td class="h" > <a name="608">608</a> </td> <td class="c0" > <a href="#609"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sleep $self->{logoVars}->{sp}/100; </td> </tr> <tr> <td class="h" > <a name="609">609</a> </td> <td class="c0" > <a href="#669"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->draw(); </td> </tr> <tr> <td class="h" > <a name="610">610</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="611">611</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="612">612</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="613">613</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="614">614</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="615">615</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 Exported Routines </td> </tr> <tr> <td class="h" > <a name="616">616</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="617">617</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Graille exports some functions for additional console graphical manipulation </td> </tr> <tr> <td class="h" > <a name="618">618</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> This includes drawing of borders, printing characters at specific locations </td> </tr> <tr> <td class="h" > <a name="619">619</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> in the terminal window, and colouring the characters, clearing the screen, etc. </td> </tr> <tr> <td class="h" > <a name="620">620</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="621">621</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> printAt($row,$column,@textRows); </td> </tr> <tr> <td class="h" > <a name="622">622</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="623">623</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Prints text sent as a scalar, a list of scalars or a reference to list </td> </tr> <tr> <td class="h" > <a name="624">624</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> of scalars, at a specific location on the screen. Lists are printed </td> </tr> <tr> <td class="h" > <a name="625">625</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> from the same column but increasing row positions. </td> </tr> <tr> <td class="h" > <a name="626">626</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="627">627</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> border($top,$left,$bottom,$right,$style,$colour); </td> </tr> <tr> <td class="h" > <a name="628">628</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="629">629</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Draws a border box. </td> </tr> <tr> <td class="h" > <a name="630">630</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="631">631</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> paint($txt,$fmt) </td> </tr> <tr> <td class="h" > <a name="632">632</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="633">633</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Paints text the colour and background specified, $text may be a string, or ref </td> </tr> <tr> <td class="h" > <a name="634">634</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> to a list of strings. This is combined with C<printAt()> abouve </td> </tr> <tr> <td class="h" > <a name="635">635</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="636">636</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> clearScreen() </td> </tr> <tr> <td class="h" > <a name="637">637</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="638">638</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Guess what? clears the enire screen. This is different from C<$canvas-E<gt>clear()> </td> </tr> <tr> <td class="h" > <a name="639">639</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> which clears the Graille canvas. </td> </tr> <tr> <td class="h" > <a name="640">640</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="641">641</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="642">642</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> block2braille($block) </td> </tr> <tr> <td class="h" > <a name="643">643</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="644">644</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Given a block of binary data (a 2D Array ref of 8-bit data), return a </td> </tr> <tr> <td class="h" > <a name="645">645</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> corresponding 2d Array ref of braille blocks. This is handy to convert, </td> </tr> <tr> <td class="h" > <a name="646">646</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> say, binary font data tinto Braille blocks for blittting into the canvas; </td> </tr> <tr> <td class="h" > <a name="647">647</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="648">648</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> pixelAt($block,$px,$py) </td> </tr> <tr> <td class="h" > <a name="649">649</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="650">650</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Given a binary block of data e.g. a font or a sprite offered as a 2D Array ref </td> </tr> <tr> <td class="h" > <a name="651">651</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> find the pixel value at a certain coordinate in that block. </td> </tr> <tr> <td class="h" > <a name="652">652</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="653">653</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="654">654</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="655">655</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="656">656</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="657">657</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> our %borders=( </td> </tr> <tr> <td class="h" > <a name="658">658</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> simple=>{tl=>"+", t=>"-", tr=>"+", l=>"|", r=>"|", bl=>"+", b=>"-", br=>"+",ts=>"|",te=>"|",}, </td> </tr> <tr> <td class="h" > <a name="659">659</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> double=>{tl=>"╔", t=>"═", tr=>"╗", l=>"║", r=>"║", bl=>"╚", b=>"═", br=>"╝",ts=>"╣",te=>"╠",}, </td> </tr> <tr> <td class="h" > <a name="660">660</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> shadow=>{tl=>"┌", t=>"─", tr=>"╖", l=>"│", r=>"║", bl=>"╘", b=>"═", br=>"╝",ts=>"┨",te=>"┠",}, </td> </tr> <tr> <td class="h" > <a name="661">661</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> thin =>{tl=>"┌", t=>"─", tr=>"┐", l=>"│", r=>"│", bl=>"└", b=>"─", br=>"┘",ts=>"┤",te=>"├",}, </td> </tr> <tr> <td class="h" > <a name="662">662</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> thick =>{tl=>"┏", t=>"━", tr=>"┓", l=>"┃", r=>"┃", bl=>"┗", b=>"━", br=>"┛",ts=>"┫",te=>"┣",}, </td> </tr> <tr> <td class="h" > <a name="663">663</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="664">664</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="665">665</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> our %colours=(black =>30,red =>31,green =>32,yellow =>33,blue =>34,magenta =>35,cyan =>36,white =>37, </td> </tr> <tr> <td class="h" > <a name="666">666</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> on_black=>40,on_red=>41,on_green=>42,on_yellow=>43,on_blue=>44,on_magenta=>4,on_cyan=>46,on_white=>47, </td> </tr> <tr> <td class="h" > <a name="667">667</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> reset=>0, bold=>1, italic=>3, underline=>4, strikethrough=>9,); </td> </tr> <tr> <td class="h" > <a name="668">668</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub printAt{ </td> </tr> <tr> <td class="h" > <a name="669">669</a> </td> <td class="c0" > <a href="#670"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#669-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#669-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($row,$column,@textRows)=@_; </td> </tr> <tr> <td class="h" > <a name="670">670</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#670-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> @textRows = @{$textRows[0]} if ref $textRows[0]; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#671"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="671">671</a> </td> <td class="c0" > <a href="#672"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $blit="\033[?25l"; </td> </tr> <tr> <td class="h" > <a name="672">672</a> </td> <td class="c0" > <a href="#673"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#672-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $blit.= defined $_?("\033[".$row++.";".$column."H".(ref $_?join("",@$_):$_)):"" foreach (@textRows) ; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="673">673</a> </td> <td class="c0" > <a href="#674"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $blit; </td> </tr> <tr> <td class="h" > <a name="674">674</a> </td> <td class="c0" > <a href="#678"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print "\n"; # seems to flush the STDOUT buffer...if not then set $| to 1 </td> </tr> <tr> <td class="h" > <a name="675">675</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="676">676</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="677">677</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub cursorAt{ </td> </tr> <tr> <td class="h" > <a name="678">678</a> </td> <td class="c0" > <a href="#679"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#678-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#678-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($r,$c)=@_; </td> </tr> <tr> <td class="h" > <a name="679">679</a> </td> <td class="c0" > <a href="#685"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return "\033[?25l\033[".$r.";".$c."H"; </td> </tr> <tr> <td class="h" > <a name="680">680</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="681">681</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="682">682</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="683">683</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="684">684</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub border{ </td> </tr> <tr> <td class="h" > <a name="685">685</a> </td> <td class="c0" > <a href="#686"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#685-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#685-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($top,$left,$bottom,$right,$style,$colour,$title,$titleColour)=@_; </td> </tr> <tr> <td class="h" > <a name="686">686</a> </td> <td class="c0" > <a href="#687"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#686-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $style//="simple"; </td> </tr> <tr> <td class="h" > <a name="687">687</a> </td> <td class="c0" > <a href="#688"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#687-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return unless exists $borders{$style}; </td> </tr> <tr> <td class="h" > <a name="688">688</a> </td> <td class="c0" > <a href="#689"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @box=(colour($colour).$borders{$style}{tl}.($borders{$style}{t}x($right-$left)).$borders{$style}{tr}); </td> </tr> <tr> <td class="h" > <a name="689">689</a> </td> <td class="c0" > <a href="#690"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#689-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($title){ </td> </tr> <tr> <td class="h" > <a name="690">690</a> </td> <td class="c0" > <a href="#691"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $titleSize=4+length $title; </td> </tr> <tr> <td class="h" > <a name="691">691</a> </td> <td class="c0" > <a href="#692"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--condition.html#691-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $title=$borders{$style}{ts}.colour($titleColour||"reset")." ".$title.colour($colour)." ".$borders{$style}{te}; </td> </tr> <tr> <td class="h" > <a name="692">692</a> </td> <td class="c0" > <a href="#694"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> substr ($box[0],6,$titleSize)=$title; </td> </tr> <tr> <td class="h" > <a name="693">693</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="694">694</a> </td> <td class="c0" > <a href="#695"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> push @box,($borders{$style}{l}.(" "x($right-$left)).$borders{$style}{r})x($bottom-$top);; </td> </tr> <tr> <td class="h" > <a name="695">695</a> </td> <td class="c0" > <a href="#696"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> push @box,($borders{$style}{bl}.($borders{$style}{b}x($right-$left)).$borders{$style}{br}.colour("reset")); </td> </tr> <tr> <td class="h" > <a name="696">696</a> </td> <td class="c0" > <a href="#701"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> printAt($top,$left,\@box); </td> </tr> <tr> <td class="h" > <a name="697">697</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="698">698</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="699">699</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="700">700</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub paint{ </td> </tr> <tr> <td class="h" > <a name="701">701</a> </td> <td class="c0" > <a href="#702"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#701-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#701-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($txt,$fmt)=@_; </td> </tr> <tr> <td class="h" > <a name="702">702</a> </td> <td class="c0" > <a href="#703"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#702-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $txt unless $fmt; </td> </tr> <tr> <td class="h" > <a name="703">703</a> </td> <td class="c0" > <a href="#704"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#703-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return colour($fmt).$txt.colour("reset") unless ref $txt; </td> </tr> <tr> <td class="h" > <a name="704">704</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return [map {colour($fmt).$_.colour("reset");} @$txt] </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#708"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="705">705</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="706">706</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="707">707</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub clearScreen{ </td> </tr> <tr> <td class="h" > <a name="708">708</a> </td> <td class="c0" > <a href="#712"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#708-1"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#708-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#708-1"> 0 </a> </td> <td >   </td> <td class="s"> system($^O eq 'MSWin32'?'cls':'clear'); </td> </tr> <tr> <td class="h" > <a name="709">709</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="710">710</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="711">711</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub colour{ </td> </tr> <tr> <td class="h" > <a name="712">712</a> </td> <td class="c0" > <a href="#713"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#712-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#712-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($fmts)=@_; </td> </tr> <tr> <td class="h" > <a name="713">713</a> </td> <td class="c0" > <a href="#714"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#713-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return "" unless $fmts; </td> </tr> <tr> <td class="h" > <a name="714">714</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @formats=map {lc $_} split / +/,$fmts; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#715"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="715">715</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#715-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return join "",map {defined $colours{$_}?"\033[$colours{$_}m":""} @formats; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#722"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="716">716</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="717">717</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="718">718</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="719">719</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # given an 8 bit block of data, produce a braille block </td> </tr> <tr> <td class="h" > <a name="720">720</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub block2braille{ </td> </tr> <tr> <td class="h" > <a name="721">721</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#721-1"> 1 </a> </td> <td >   </td> <td > 3793 </td> <td class="s"> use integer; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="722">722</a> </td> <td class="c0" > <a href="#723"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#722-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#722-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($block)=@_; </td> </tr> <tr> <td class="h" > <a name="723">723</a> </td> <td class="c0" > <a href="#724"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $pixelHeight=@$block; </td> </tr> <tr> <td class="h" > <a name="724">724</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $pixelWidth=@{$block->[0]}*8; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > <a href="#725"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="725">725</a> </td> <td class="c0" > <a href="#726"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#725-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $brCharWidth=$pixelWidth/2 +($pixelWidth & 1?1:0); </td> </tr> <tr> <td class="h" > <a name="726">726</a> </td> <td class="c0" > <a href="#727"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#726-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $brCharHeight=$pixelHeight/4 + ($pixelHeight & 1?1:0); </td> </tr> <tr> <td class="h" > <a name="727">727</a> </td> <td class="c0" > <a href="#729"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $brBlk=[]; </td> </tr> <tr> <td class="h" > <a name="728">728</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="729">729</a> </td> <td class="c0" > <a href="#730"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $chX(0..($brCharWidth-1)){ </td> </tr> <tr> <td class="h" > <a name="730">730</a> </td> <td class="c0" > <a href="#731"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $chY(0..($brCharHeight-1)){ </td> </tr> <tr> <td class="h" > <a name="731">731</a> </td> <td class="c0" > <a href="#732"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $b=ord('⠀'); </td> </tr> <tr> <td class="h" > <a name="732">732</a> </td> <td class="c0" > <a href="#733"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#732-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $b|=ord('⠁') if (pixelAt($block,$chX*2,$chY*4)); </td> </tr> <tr> <td class="h" > <a name="733">733</a> </td> <td class="c0" > <a href="#734"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#733-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $b|=ord('⠂') if (pixelAt($block,$chX*2,$chY*4+1)); </td> </tr> <tr> <td class="h" > <a name="734">734</a> </td> <td class="c0" > <a href="#735"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#734-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $b|=ord('⠄') if (pixelAt($block,$chX*2,$chY*4+2)); </td> </tr> <tr> <td class="h" > <a name="735">735</a> </td> <td class="c0" > <a href="#736"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#735-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $b|=ord('⡀') if (pixelAt($block,$chX*2,$chY*4+3)); </td> </tr> <tr> <td class="h" > <a name="736">736</a> </td> <td class="c0" > <a href="#737"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#736-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $b|=ord('⠈') if (pixelAt($block,$chX*2+1,$chY*4)); </td> </tr> <tr> <td class="h" > <a name="737">737</a> </td> <td class="c0" > <a href="#738"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#737-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $b|=ord('⠐') if (pixelAt($block,$chX*2+1,$chY*4+1)); </td> </tr> <tr> <td class="h" > <a name="738">738</a> </td> <td class="c0" > <a href="#739"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#738-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $b|=ord('⠠') if (pixelAt($block,$chX*2+1,$chY*4+2)); </td> </tr> <tr> <td class="h" > <a name="739">739</a> </td> <td class="c0" > <a href="#740"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#739-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $b|=ord('⢀') if (pixelAt($block,$chX*2+1,$chY*4+3)); </td> </tr> <tr> <td class="h" > <a name="740">740</a> </td> <td class="c0" > <a href="#743"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $brBlk->[$chY]->[$chX]=chr($b); </td> </tr> <tr> <td class="h" > <a name="741">741</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="742">742</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="743">743</a> </td> <td class="c0" > <a href="#750"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $brBlk; </td> </tr> <tr> <td class="h" > <a name="744">744</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="745">745</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="746">746</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # given a block of binary data identify pixel value at a </td> </tr> <tr> <td class="h" > <a name="747">747</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # particular position </td> </tr> <tr> <td class="h" > <a name="748">748</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub pixelAt{ </td> </tr> <tr> <td class="h" > <a name="749">749</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Term-Graille-pm--subroutine.html#749-1"> 1 </a> </td> <td >   </td> <td > 301 </td> <td class="s"> use integer; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="750">750</a> </td> <td class="c0" > <a href="#751"> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#750-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#750-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($blk,$px,$py)=@_; </td> </tr> <tr> <td class="h" > <a name="751">751</a> </td> <td class="c0" > <a href="#756"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return (($blk->[$py]->[$px/8]) & 2**(7-($px%8))); </td> </tr> <tr> <td class="h" > <a name="752">752</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="753">753</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="754">754</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="755">755</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub DESTROY{ </td> </tr> <tr> <td class="h" > <a name="756">756</a> </td> <td class="c0" > <a href="#757"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--branch.html#756-1"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Term-Graille-pm--subroutine.html#756-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> if ($^O eq "MSWin32") { </td> </tr> <tr> <td class="h" > <a name="757">757</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> system("chcp 850"); </td> </tr> <tr> <td class="h" > <a name="758">758</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="759">759</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="760">760</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="761">761</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 1; </td> </tr> <tr> <td class="h" > <a name="762">762</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> __END__ </td> </tr> </table> </body> </html>