line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id$ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Google::Chart::Fill::LinearGradient; |
4
|
1
|
|
|
1
|
|
6
|
use Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
10
|
|
5
|
1
|
|
|
1
|
|
8115
|
use Moose::Util::TypeConstraints; |
|
1
|
|
|
|
|
42
|
|
|
1
|
|
|
|
|
13
|
|
6
|
1
|
|
|
1
|
|
2602
|
use Google::Chart::Types; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
10
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'Google::Chart::Fill'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
subtype 'Google::Chart::Fill::LinearGradient::Angle' |
11
|
|
|
|
|
|
|
=> as 'Num' |
12
|
|
|
|
|
|
|
=> where { $_ >= 0 && $_ <= 90 } |
13
|
|
|
|
|
|
|
=> message { "Angle spec must be between 0 and 90" } |
14
|
|
|
|
|
|
|
; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
subtype 'Google::Chart::Fill::LinearGradient::Offset' |
17
|
|
|
|
|
|
|
=> as 'Num' |
18
|
|
|
|
|
|
|
=> where { $_ >= 0 && $_ <= 1 } |
19
|
|
|
|
|
|
|
=> message { "Offset spec must be between 0 and 1" } |
20
|
|
|
|
|
|
|
; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has 'target' => ( |
23
|
|
|
|
|
|
|
is => 'rw', |
24
|
|
|
|
|
|
|
isa => enum([ qw(bc c) ]), |
25
|
|
|
|
|
|
|
default => 'bc', |
26
|
|
|
|
|
|
|
required => 1, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has 'angle' => ( |
30
|
|
|
|
|
|
|
is => 'rw', |
31
|
|
|
|
|
|
|
isa => 'Google::Chart::Fill::LinearGradient::Angle', |
32
|
|
|
|
|
|
|
default => 0, |
33
|
|
|
|
|
|
|
required => 1 |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
has 'color1' => ( |
37
|
|
|
|
|
|
|
is => 'rw', |
38
|
|
|
|
|
|
|
isa => 'Google::Chart::Color::Data', |
39
|
|
|
|
|
|
|
required => 1 |
40
|
|
|
|
|
|
|
); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
has 'color2' => ( |
43
|
|
|
|
|
|
|
is => 'rw', |
44
|
|
|
|
|
|
|
isa => 'Google::Chart::Color::Data', |
45
|
|
|
|
|
|
|
required => 1 |
46
|
|
|
|
|
|
|
); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
has 'offset1' => ( |
49
|
|
|
|
|
|
|
is => 'rw', |
50
|
|
|
|
|
|
|
isa => 'Google::Chart::Fill::LinearGradient::Offset', |
51
|
|
|
|
|
|
|
default => 0, |
52
|
|
|
|
|
|
|
required => 1, |
53
|
|
|
|
|
|
|
); |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
has 'offset2' => ( |
56
|
|
|
|
|
|
|
is => 'rw', |
57
|
|
|
|
|
|
|
isa => 'Google::Chart::Fill::LinearGradient::Offset', |
58
|
|
|
|
|
|
|
default => 0, |
59
|
|
|
|
|
|
|
required => 1, |
60
|
|
|
|
|
|
|
); |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
63
|
|
|
|
|
|
|
|
64
|
1
|
|
|
1
|
|
495
|
no Moose; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
8
|
|
65
|
1
|
|
|
1
|
|
249
|
no Moose::Util::TypeConstraints; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub parameter_value { |
68
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
69
|
0
|
|
|
|
|
|
return join(",", $self->target, 'lg', $self->angle, $self->color1, $self->offset1, $self->color2, $self->offset2); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
1; |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
__END__ |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 NAME |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Google::Chart::Fill::LinearGradient - Apply Gradient Fill |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 METHODS |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head2 parameter_value |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |