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   1258 use v5.26;
  2         6  
4 2     2   11 use Object::Pad;
  2         3  
  2         10  
5 2     2   171 use utf8;
  2         3  
  2         8  
6 2     2   37 use Carp;
  2         60  
  2         333  
7              
8             class SVGPDF::Ellipse :isa(SVGPDF::Element);
9              
10 14     14 0 17 method process () {
  14         28  
  14         13  
11 14         44 my $atts = $self->atts;
12 14         55 my $xo = $self->xo;
13 14 50       32 return if $atts->{omit}; # for testing/debugging.
14              
15 14         40 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         37 $self->_dbg( $self->name, " cx=$cx cy=$cy rx=$rx ry=$ry" );
19 14         44 $self->_dbg( "+ xo save" );
20 14         62 $xo->save;
21              
22 14         569 $self->set_graphics;
23 14 50       35 $self->set_transform($tf) if $tf;
24 14         52 $xo->ellipse( $cx, $cy, $rx, $ry );
25 14         30927 $self->_paintsub->();
26              
27 14         470 $self->_dbg( "- xo restore" );
28 14         47 $xo->restore;
29 14         418 $self->css_pop;
30             }
31              
32              
33             1;