line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SDLx::Surface::TiedMatrix; |
2
|
10
|
|
|
10
|
|
33
|
use strict; |
|
10
|
|
|
|
|
10
|
|
|
10
|
|
|
|
|
238
|
|
3
|
10
|
|
|
10
|
|
31
|
use warnings; |
|
10
|
|
|
|
|
12
|
|
|
10
|
|
|
|
|
158
|
|
4
|
10
|
|
|
10
|
|
2492
|
use SDLx::Surface::TiedMatrixRow; |
|
10
|
|
|
|
|
15
|
|
|
10
|
|
|
|
|
203
|
|
5
|
10
|
|
|
10
|
|
39
|
use base 'Tie::Array'; |
|
10
|
|
|
|
|
9
|
|
|
10
|
|
|
|
|
1610
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new { |
8
|
5
|
|
|
5
|
0
|
4
|
my $class = shift; |
9
|
5
|
|
|
|
|
5
|
my $matrix = shift; |
10
|
5
|
|
|
|
|
16
|
my $self = { |
11
|
|
|
|
|
|
|
matrix => $matrix, |
12
|
|
|
|
|
|
|
rows => [], |
13
|
|
|
|
|
|
|
}; |
14
|
5
|
|
|
|
|
13
|
return bless $self, $class; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub TIEARRAY { |
18
|
5
|
|
|
5
|
|
14
|
return SDLx::Surface::TiedMatrix->new( $_[1] ); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub FETCH { |
22
|
70
|
|
|
70
|
|
62
|
my ( $self, $y ) = @_; |
23
|
|
|
|
|
|
|
|
24
|
70
|
100
|
|
|
|
111
|
unless ( $self->{rows}[$y] ) { |
25
|
10
|
|
|
|
|
34
|
tie my @row, 'SDLx::Surface::TiedMatrixRow', $self->{matrix}, $y; |
26
|
10
|
|
|
|
|
17
|
$self->{rows}[$y] = \@row; |
27
|
|
|
|
|
|
|
} |
28
|
70
|
|
|
|
|
235
|
return $self->{rows}[$y]; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub FETCHSIZE { |
32
|
4
|
|
|
4
|
|
5
|
my ( $self, $x ) = @_; |
33
|
4
|
|
|
|
|
8
|
return $self->{matrix}->surface->h; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |