Clicker/Decoration/Glass.pm

filter: Statementstmt 72.7% 24 / 33 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod n/a totaltotal 75.6% 31 / 41 CC 1 SCAR 1.2
CC
1
Cov
73%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« Clicker/Drawing/ColorAllocator.pm ↑ Summary Clicker/Context.pm »
1 package Chart::Clicker::Decoration::Glass;
2 1 $Chart::Clicker::Decoration::Glass::VERSION = '2.90';
3 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 extends 'Chart::Clicker::Decoration';
6  
7 # ABSTRACT: Under-chart gradient decoration
8  
9 1 ▶use Graphics::Color::RGB;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Graphics::Primitive::Operation::Fill;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Graphics::Primitive::Paint::Solid;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13  
14 has 'background_color' => (
15 is => 'rw',
16 isa => 'Graphics::Color::RGB',
17 1 ▶ default => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
18 1 Graphics::Color::RGB->new(
19 red => 1, green => 0, blue => 0, alpha => 1
20 )
21 }
22 1 );
23  
24  
25 has 'glare_color' => (
26 is => 'rw',
27 isa => 'Graphics::Color::RGB',
28 1 ▶ default => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
29 1 Graphics::Color::RGB->new(
30 red => 1, green => 1, blue => 1, alpha => 1
31 )
32 },
33 1 );
34  
35 0 ▶override('finalize', sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
36 0 my ($self) = @_;
37  
38 0 my $twentypofheight = $self->height * .20;
39  
40 0 $self->move_to(1, $twentypofheight);
41  
42 0 $self->rel_curve_to(
43 0, 0,
44 $self->width / 2, $self->height * .30,
45 $self->width, 0
46 );
47  
48 0 $self->line_to($self->width, 0);
49 0 $self->line_to(0, 0);
50 0 $self->line_to(0, $twentypofheight);
51  
52 0 my $fillop = Graphics::Primitive::Operation::Fill->new(
53 paint => Graphics::Primitive::Paint::Solid->new(
54 color => $self->glare_color
55 )
56 );
57 0 $self->do($fillop);
58 1 });
59  
60 1 __PACKAGE__->meta->make_immutable;
61  
62 1 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
63  
64 1 1;
65  
66 __END__
« Clicker/Drawing/ColorAllocator.pm ↑ Summary Clicker/Context.pm »