Khonsu/Shape/Line.pm

filter: Statementstmt 73.3% 11 / 15 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod 0.0% 0 / 1 totaltotal 66.6% 16 / 24 CC 4 SCAR 14.6
CC
4
Cov
67%
shape
5.1
BEGIN
1.0
CRAP 4.3
« Khonsu/Text/H1.pm ↑ Summary Khonsu/Page/Header.pm »
1 package Khonsu::Shape::Line;
2  
3 3 ▶use parent 'Khonsu::Shape';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 sub shape {
6 2 ▶ my ($self, $file, $shape, %args) = @_;
Subroutine shape: called CC=4 SCAR=16.3
Pod undocumented
7 2 $shape->strokecolor($args{fill_colour});
8 2 $shape->move($args{x}, $file->page->h - ($args{y} + 1));
9 2 ▶ if ($args{dash}) {
Branch: 3 branches
BranchTrueFalseTotal
if ($args{'dash'}) { } 0 2 2
elsif ($args{'type'} eq 'dots') { } 0 2 2
elsif ($args{'type'} eq 'dashed') { } 0 2 2
10 0 $shape->linedash(@{$args{dash}});
11 } elsif ($args{type} eq 'dots') {
12 0 $shape->linedash(1, 1);
13 } elsif ($args{type} eq 'dashed') {
14 0 $shape->linedash(5, 5);
15 }
16 2 $shape->linejoin();
17 2 $shape->line($args{ex}, $file->page->h - ($args{ey} + 1));
18 2 $shape->stroke;
19 }
20  
21 3 1;
« Khonsu/Text/H1.pm ↑ Summary Khonsu/Page/Header.pm »