line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#_{ Encoding and name |
2
|
|
|
|
|
|
|
=encoding utf8 |
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
Grid::Layout::Cell |
5
|
|
|
|
|
|
|
=cut |
6
|
|
|
|
|
|
|
#_} |
7
|
|
|
|
|
|
|
package Grid::Layout::Cell; |
8
|
|
|
|
|
|
|
#_{ use … |
9
|
5
|
|
|
5
|
|
29
|
use warnings; |
|
5
|
|
|
|
|
5
|
|
|
5
|
|
|
|
|
126
|
|
10
|
5
|
|
|
5
|
|
20
|
use strict; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
78
|
|
11
|
5
|
|
|
5
|
|
20
|
use utf8; |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
19
|
|
12
|
|
|
|
|
|
|
|
13
|
5
|
|
|
5
|
|
83
|
use Carp; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
1121
|
|
14
|
|
|
|
|
|
|
#_} |
15
|
|
|
|
|
|
|
our $VERSION = 0.01; |
16
|
|
|
|
|
|
|
#_{ Synopsis |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
=cut |
20
|
|
|
|
|
|
|
#_} |
21
|
|
|
|
|
|
|
#_{ Description |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 DESCRIPTION |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
A C<< Grid::Layout::Cell >> is the intersection of two orthogonal |
26
|
|
|
|
|
|
|
L<< Grid::Layout::Track >>s. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
It is the smallest unit with size in a grid. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Although the I for all cells is equal, the I of rendered cell can vary. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
#_} |
34
|
|
|
|
|
|
|
#_{ Methods |
35
|
|
|
|
|
|
|
#_{ POD |
36
|
|
|
|
|
|
|
=head1 METHODS |
37
|
|
|
|
|
|
|
=cut |
38
|
|
|
|
|
|
|
#_} |
39
|
|
|
|
|
|
|
sub new { #_{ |
40
|
|
|
|
|
|
|
#_{ POD |
41
|
|
|
|
|
|
|
=head2 new |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |
44
|
|
|
|
|
|
|
#_} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
136
|
|
|
136
|
0
|
157
|
my $class = shift; |
48
|
|
|
|
|
|
|
|
49
|
136
|
|
|
|
|
149
|
my $grid_layout = shift; |
50
|
136
|
|
|
|
|
168
|
my $x = shift; |
51
|
136
|
|
|
|
|
173
|
my $y = shift; |
52
|
|
|
|
|
|
|
|
53
|
136
|
50
|
|
|
|
258
|
croak 'Grid::Layout expected' unless $grid_layout->isa('Grid::Layout' ); |
54
|
136
|
50
|
|
|
|
311
|
croak 'Number expected' unless $x =~ /^\d+/; |
55
|
136
|
50
|
|
|
|
249
|
croak 'Number expected' unless $y =~ /^\d+/; |
56
|
|
|
|
|
|
|
|
57
|
136
|
|
|
|
|
158
|
my $self = {}; |
58
|
|
|
|
|
|
|
|
59
|
136
|
|
|
|
|
192
|
$self->{grid_layout} = $grid_layout; |
60
|
136
|
|
|
|
|
170
|
$self->{x } = $x; |
61
|
136
|
|
|
|
|
167
|
$self->{y } = $y; |
62
|
|
|
|
|
|
|
|
63
|
136
|
|
|
|
|
156
|
bless $self, $class; |
64
|
136
|
|
|
|
|
317
|
return $self; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
} #_} |
67
|
|
|
|
|
|
|
#_{ x/y |
68
|
|
|
|
|
|
|
sub x { #_{ |
69
|
143
|
|
|
143
|
0
|
27424
|
my $self = shift; |
70
|
143
|
|
|
|
|
300
|
return $self->{x}; |
71
|
|
|
|
|
|
|
} #_} |
72
|
|
|
|
|
|
|
sub y { #_{ |
73
|
126
|
|
|
126
|
0
|
172
|
my $self = shift; |
74
|
126
|
|
|
|
|
218
|
return $self->{y}; |
75
|
|
|
|
|
|
|
} #_} |
76
|
|
|
|
|
|
|
#_} |
77
|
|
|
|
|
|
|
#_} |
78
|
|
|
|
|
|
|
#_{ POD: Copyright |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 Copyright |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Copyright © 2017 René Nyffenegger, Switzerland. All rights reserved. |
83
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
84
|
|
|
|
|
|
|
under the terms of the the Artistic License (2.0). You may obtain a |
85
|
|
|
|
|
|
|
copy of the full license at: L |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
#_} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
'tq84'; |