| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# $Id$ |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Google::Chart::Fill::LinearStripes; |
|
4
|
1
|
|
|
1
|
|
6
|
use Moose; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
10
|
|
|
5
|
1
|
|
|
1
|
|
6775
|
use Moose::Util::TypeConstraints; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
10
|
|
|
6
|
1
|
|
|
1
|
|
1994
|
use Google::Chart::Types; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
9
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'Google::Chart::Fill'; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
subtype 'Google::Chart::Fill::LinearStripes::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::LinearStripes::StripeList' |
|
17
|
|
|
|
|
|
|
=> as 'ArrayRef[Google::Chart::Fill::LinearStripes::Stripe]' |
|
18
|
|
|
|
|
|
|
; |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
coerce 'Google::Chart::Fill::LinearStripes::StripeList' |
|
21
|
|
|
|
|
|
|
=> from 'ArrayRef' |
|
22
|
|
|
|
|
|
|
=> via { |
|
23
|
|
|
|
|
|
|
my @list; |
|
24
|
|
|
|
|
|
|
foreach my $h (@$_) { |
|
25
|
|
|
|
|
|
|
push @list, Google::Chart::Fill::LinearStripes::Strip->new(%$h); |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
return \@list; |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
; |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
has 'target' => ( |
|
32
|
|
|
|
|
|
|
is => 'rw', |
|
33
|
|
|
|
|
|
|
isa => enum([ qw(bc c) ]), |
|
34
|
|
|
|
|
|
|
required => 1, |
|
35
|
|
|
|
|
|
|
); |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
has 'angle' => ( |
|
38
|
|
|
|
|
|
|
is => 'rw', |
|
39
|
|
|
|
|
|
|
isa => 'Google::Chart::Fill::LinearStripes::Angle', |
|
40
|
|
|
|
|
|
|
required => 1 |
|
41
|
|
|
|
|
|
|
); |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
has 'stripes' => ( |
|
44
|
|
|
|
|
|
|
is => 'rw', |
|
45
|
|
|
|
|
|
|
isa => 'Google::Chart::Fill::LinearStripes::StripeList', |
|
46
|
|
|
|
|
|
|
coerce => 1, |
|
47
|
|
|
|
|
|
|
required => 1, |
|
48
|
|
|
|
|
|
|
auto_deref => 1, |
|
49
|
|
|
|
|
|
|
); |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
52
|
|
|
|
|
|
|
|
|
53
|
1
|
|
|
1
|
|
385
|
no Moose; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
5
|
|
|
54
|
1
|
|
|
1
|
|
205
|
no Moose::Util::TypeConstraints; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
6
|
|
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub parameter_value { |
|
57
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
58
|
0
|
|
|
|
|
|
return join(",", $self->target, 'ls', $self->angle, |
|
59
|
0
|
|
|
|
|
|
map { $_->as_query } $self->stripes ) |
|
60
|
|
|
|
|
|
|
} |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
package |
|
63
|
|
|
|
|
|
|
Google::Chart::Fill::LinearStripes::Stripe; |
|
64
|
1
|
|
|
1
|
|
322
|
use Moose; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
4
|
|
|
65
|
1
|
|
|
1
|
|
6494
|
use Moose::Util::TypeConstraints; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
6
|
|
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
with 'Google::Chart::QueryComponent'; |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
subtype 'Google::Chart::Fill::LinearStripes::Stripe::Width' |
|
70
|
|
|
|
|
|
|
=> as 'Num' |
|
71
|
|
|
|
|
|
|
=> where { $_ > 0 && $_ <= 1 } |
|
72
|
|
|
|
|
|
|
=> message { "Stripe width spec must be between 0 and 1" } |
|
73
|
|
|
|
|
|
|
; |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
has 'color' => ( |
|
77
|
|
|
|
|
|
|
is => 'rw', |
|
78
|
|
|
|
|
|
|
isa => 'Google::Chart::Color::Data', |
|
79
|
|
|
|
|
|
|
required => 1 |
|
80
|
|
|
|
|
|
|
); |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
has 'width' => ( |
|
83
|
|
|
|
|
|
|
is => 'rw', |
|
84
|
|
|
|
|
|
|
isa => 'Google::Chart::Fill::LinearStripes::Strip::Width', |
|
85
|
|
|
|
|
|
|
required => 1 |
|
86
|
|
|
|
|
|
|
); |
|
87
|
|
|
|
|
|
|
|
|
88
|
1
|
|
|
1
|
|
2058
|
no Moose; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
6
|
|
|
89
|
1
|
|
|
1
|
|
199
|
no Moose::Util::TypeConstraints; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
5
|
|
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
sub as_query { |
|
92
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
93
|
0
|
|
|
|
|
|
return join(',', $self->color, $self->width); |
|
94
|
|
|
|
|
|
|
} |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
1; |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
__END__ |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 NAME |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Google::Chart::Fill::LinearStripes - Apply Linear Strip Fill |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 METHODS |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 parameter_value |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=cut |