| 1 | # $Id$ | ||||||||||
| 2 | |||||||||||
| 3 | package Google::Chart::Fill::LinearGradient; | ||||||||||
| 4 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use Moose::Util::TypeConstraints; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use Google::Chart::Types; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | with 'Google::Chart::Fill'; | |||||||||
| 9 | |||||||||||
| 10 | subtype 'Google::Chart::Fill::LinearGradient::Angle' | ||||||||||
| 11 | => as 'Num' | ||||||||||
| 12 | 0 | ▶ | => where { $_ >= 0 && $_ <= 90 } | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 13 | 0 | ▶ | => message { "Angle spec must be between 0 and 90" } | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 14 | 1 | ; | |||||||||
| 15 | |||||||||||
| 16 | subtype 'Google::Chart::Fill::LinearGradient::Offset' | ||||||||||
| 17 | => as 'Num' | ||||||||||
| 18 | 0 | ▶ | => where { $_ >= 0 && $_ <= 1 } | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 19 | 0 | ▶ | => message { "Offset spec must be between 0 and 1" } | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 20 | 1 | ; | |||||||||
| 21 | |||||||||||
| 22 | 1 | has 'target' => ( | |||||||||
| 23 | is => 'rw', | ||||||||||
| 24 | isa => enum([ qw(bc c) ]), | ||||||||||
| 25 | default => 'bc', | ||||||||||
| 26 | required => 1, | ||||||||||
| 27 | ); | ||||||||||
| 28 | |||||||||||
| 29 | 1 | has 'angle' => ( | |||||||||
| 30 | is => 'rw', | ||||||||||
| 31 | isa => 'Google::Chart::Fill::LinearGradient::Angle', | ||||||||||
| 32 | default => 0, | ||||||||||
| 33 | required => 1 | ||||||||||
| 34 | ); | ||||||||||
| 35 | |||||||||||
| 36 | 1 | has 'color1' => ( | |||||||||
| 37 | is => 'rw', | ||||||||||
| 38 | isa => 'Google::Chart::Color::Data', | ||||||||||
| 39 | required => 1 | ||||||||||
| 40 | ); | ||||||||||
| 41 | |||||||||||
| 42 | 1 | has 'color2' => ( | |||||||||
| 43 | is => 'rw', | ||||||||||
| 44 | isa => 'Google::Chart::Color::Data', | ||||||||||
| 45 | required => 1 | ||||||||||
| 46 | ); | ||||||||||
| 47 | |||||||||||
| 48 | 1 | has 'offset1' => ( | |||||||||
| 49 | is => 'rw', | ||||||||||
| 50 | isa => 'Google::Chart::Fill::LinearGradient::Offset', | ||||||||||
| 51 | default => 0, | ||||||||||
| 52 | required => 1, | ||||||||||
| 53 | ); | ||||||||||
| 54 | |||||||||||
| 55 | 1 | has 'offset2' => ( | |||||||||
| 56 | is => 'rw', | ||||||||||
| 57 | isa => 'Google::Chart::Fill::LinearGradient::Offset', | ||||||||||
| 58 | default => 0, | ||||||||||
| 59 | required => 1, | ||||||||||
| 60 | ); | ||||||||||
| 61 | |||||||||||
| 62 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||
| 63 | |||||||||||
| 64 | 1 | ▶ | no Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 65 | 1 | ▶ | no Moose::Util::TypeConstraints; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 66 | |||||||||||
| 67 | 0 | ▶ | sub parameter_value { | ||||||||
|
Subroutine
parameter_value: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 68 | 0 | my $self = shift; | |||||||||
| 69 | 0 | return join(",", $self->target, 'lg', $self->angle, $self->color1, $self->offset1, $self->color2, $self->offset2); | |||||||||
| 70 | } | ||||||||||
| 71 | |||||||||||
| 72 | 1 | 1; | |||||||||
| 73 | |||||||||||
| 74 | __END__ | ||||||||||