lib/ChordPro/lib/SVGPDF/Polyline.pm

filter: Statementstmt 34.8% 15 / 43 Branchbran 0.0% 0 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 2 totaltotal 31.1% 19 / 61 CC 6 SCAR 31.5
CC
6
Cov
28%
process_polyline
42.0
process
1.5
BEGIN
1.0
CRAP 23.4
« lib/ChordPro/Output/PDF/Configurator.pm ↑ Summary lib/ChordPro/lib/SVGPDF/Use.pm »
1 #! perl
2  
3 12 ▶use v5.26;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 12 ▶use Object::Pad;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 12 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 12 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 class SVGPDF::Polyline :isa(SVGPDF::Element);
9  
10 0 ▶method process () {
Subroutine process: not called CC=1 SCAR=4.1
Pod undocumented
11 0 $self->process_polyline(0);
12 12 }
13  
14 0 ▶method process_polyline ( $close ) {
Subroutine process_polyline: not called CC=6 SCAR=37.4
Pod undocumented
15 0 my $atts = $self->atts;
16 0 my $xo = $self->xo;
17 0 ▶ return if $atts->{omit}; # for testing/debugging.
Branch: 1 branch
BranchTrueFalseTotal
if $atts->{"omit"} 0 0 0
18  
19 0 my ( $points, $tf ) = $self->get_params( $atts, qw(points:s transform:s) );
20  
21 0 my @d = $self-> getargs($points);
22  
23 0 my $t = $points;
24 0 ▶ $t = substr($t,0,20) . "..." if length($t) > 20;
Branch: 1 branch
BranchTrueFalseTotal
if length $t > 20 0 0 0
25 0 $self->_dbg( $self->name, " points=\"$t\"" );
26 0 $self->_dbg( "+ xo save" );
27 0 $xo->save;
28  
29 0 $self->set_graphics;
30 0 ▶ $self->set_transform($tf) if $tf;
Branch: 1 branch
BranchTrueFalseTotal
if $tf 0 0 0
31  
32 0 ▶ if ( @d ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@d) 0 0 0
33 0 $xo->move( $d[0], $d[1] );
34 0 $xo->polyline( @d[2 .. $#d] );
35 0 ▶ $xo->close if $close;
Branch: 1 branch
BranchTrueFalseTotal
if $close 0 0 0
36 0 $self->_paintsub->();
37 }
38  
39 0 $self->_dbg( "- xo restore" );
40 0 $xo->restore;
41 0 $self->css_pop;
42 12 }
43  
44  
45 12 1;
« lib/ChordPro/Output/PDF/Configurator.pm ↑ Summary lib/ChordPro/lib/SVGPDF/Use.pm »