File Coverage

blib/lib/SVGPDF/Ellipse.pm
Criterion Covered Total %
statement 28 28 100.0
branch 2 4 50.0
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 35 38 92.1


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