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   1821 use v5.26;
  2         9  
4 2     2   9 use Object::Pad;
  2         2  
  2         11  
5 2     2   190 use utf8;
  2         2  
  2         9  
6 2     2   42 use Carp;
  2         58  
  2         427  
7              
8             class SVGPDF::Ellipse :isa(SVGPDF::Element);
9              
10 14     14 0 16 method process () {
  14         27  
  14         12  
11 14         40 my $atts = $self->atts;
12 14         55 my $xo = $self->xo;
13 14 50       30 return if $atts->{omit}; # for testing/debugging.
14              
15 14         38 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         32 $self->_dbg( $self->name, " cx=$cx cy=$cy rx=$rx ry=$ry" );
19 14         40 $self->_dbg( "+ xo save" );
20 14         66 $xo->save;
21              
22 14         609 $self->set_graphics;
23 14 50       29 $self->set_transform($tf) if $tf;
24 14         71 $xo->ellipse( $cx, $cy, $rx, $ry );
25 14         30194 $self->_paintsub->();
26              
27 14         469 $self->_dbg( "- xo restore" );
28 14         46 $xo->restore;
29 14         402 $self->css_pop;
30             }
31              
32              
33             1;