File Coverage

lib/ChordPro/lib/SVGPDF/Ellipse.pm
Criterion Covered Total %
statement 11 28 39.2
branch 0 4 0.0
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 15 38 39.4


line stmt bran cond sub pod time code
1             #! perl
2              
3 10     10   162 use v5.26;
  10         46  
4 10     10   67 use Object::Pad;
  10         23  
  10         77  
5 10     10   1431 use utf8;
  10         26  
  10         75  
6 10     10   378 use Carp;
  10         24  
  10         2500  
7              
8             class SVGPDF::Ellipse :isa(SVGPDF::Element);
9              
10 0     0 0   method process () {
  0            
  0            
11 0           my $atts = $self->atts;
12 0           my $xo = $self->xo;
13 0 0         return if $atts->{omit}; # for testing/debugging.
14              
15 0           my ( $cx, $cy, $rx, $ry, $tf ) =
16             $self->get_params( $atts, qw( cx:H cy:V rx:H ry:V transform:s ) );
17              
18 0           $self->_dbg( $self->name, " cx=$cx cy=$cy rx=$rx ry=$ry" );
19 0           $self->_dbg( "+ xo save" );
20 0           $xo->save;
21              
22 0           $self->set_graphics;
23 0 0         $self->set_transform($tf) if $tf;
24 0           $xo->ellipse( $cx, $cy, $rx, $ry );
25 0           $self->_paintsub->();
26              
27 0           $self->_dbg( "- xo restore" );
28 0           $xo->restore;
29 0           $self->css_pop;
30             }
31              
32              
33             1;