line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SDLx::Surface::TiedMatrixRow; |
2
|
10
|
|
|
10
|
|
34
|
use strict; |
|
10
|
|
|
|
|
12
|
|
|
10
|
|
|
|
|
248
|
|
3
|
10
|
|
|
10
|
|
31
|
use warnings; |
|
10
|
|
|
|
|
12
|
|
|
10
|
|
|
|
|
177
|
|
4
|
10
|
|
|
10
|
|
30
|
use base 'Tie::Array'; |
|
10
|
|
|
|
|
10
|
|
|
10
|
|
|
|
|
1847
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
10
|
|
|
10
|
0
|
9
|
my $class = shift; |
8
|
10
|
|
|
|
|
9
|
my $matrix = shift; |
9
|
10
|
|
|
|
|
8
|
my $y = shift; |
10
|
|
|
|
|
|
|
|
11
|
10
|
|
|
|
|
20
|
my $self = { |
12
|
|
|
|
|
|
|
matrix => $matrix, |
13
|
|
|
|
|
|
|
y => $y, |
14
|
|
|
|
|
|
|
}; |
15
|
|
|
|
|
|
|
|
16
|
10
|
|
|
|
|
26
|
return bless $self, $class; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub TIEARRAY { |
20
|
10
|
|
|
10
|
|
25
|
return SDLx::Surface::TiedMatrixRow->new( $_[1], $_[2] ); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub FETCH { |
24
|
60
|
|
|
60
|
|
236
|
my ( $self, $x ) = @_; |
25
|
60
|
|
|
|
|
120
|
$self->{matrix}->get_pixel( $x, $self->{y} ); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub FETCHSIZE { |
29
|
|
|
|
|
|
|
|
30
|
4
|
|
|
4
|
|
5
|
my ( $self, $x ) = @_; |
31
|
4
|
|
|
|
|
10
|
return $self->{matrix}->surface->w; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub STORE { |
36
|
6
|
|
|
6
|
|
6
|
my ( $self, $x, $new_value ) = @_; |
37
|
6
|
|
|
|
|
15
|
$self->{matrix}->set_pixel( $x, $self->{y}, $new_value ); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |