line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package VS::Chart::Color::Gradient; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
46
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
190
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
0
|
|
|
0
|
1
|
|
my ($pkg, $c1, $c2) = @_; |
8
|
0
|
|
|
|
|
|
my $self = bless [$c1, $c2], $pkg; |
9
|
0
|
|
|
|
|
|
return $self; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub set { |
13
|
0
|
|
|
0
|
1
|
|
my ($self, $cx, $surface, $width, $height) = @_; |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
|
my $gr = Cairo::LinearGradient->create(0, 0, 0, $height); |
16
|
0
|
|
|
|
|
|
$gr->add_color_stop_rgba(0, @{$self->[0]}); |
|
0
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
$gr->add_color_stop_rgba(1, @{$self->[1]}); |
|
0
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
$cx->set_source($gr); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
__END__ |