File Coverage

blib/lib/SVGPDF/Circle.pm
Criterion Covered Total %
statement 31 31 100.0
branch 2 4 50.0
condition n/a
subroutine 6 6 100.0
pod 0 1 0.0
total 39 42 92.8


line stmt bran cond sub pod time code
1             #! perl
2              
3 2     2   4187 use v5.26;
  2         5  
4 2     2   12 use Object::Pad;
  2         4  
  2         13  
5 2     2   215 use utf8;
  2         3  
  2         11  
6 2     2   1731 use Carp;
  2         5  
  2         316  
7              
8 1     1   485 class SVGPDF::Circle :isa(SVGPDF::Element);
  1         70  
  1         129  
9              
10 20     20 0 22 method process () {
  20         33  
  20         34  
11 20         47 my $atts = $self->atts;
12 20         40 my $xo = $self->xo;
13 20 50       45 return if $atts->{omit}; # for testing/debugging.
14              
15 20         46 my ( $cx, $cy, $r, $tf ) =
16             $self->get_params( $atts, qw( cx:H cy:V r:U transform:s ) );
17              
18 20         46 $self->_dbg( $self->name, " cx=$cx cy=$cy r=$r" );
19 20         61 $self->_dbg( "+ xo save" );
20 20         90 $xo->save;
21              
22 20         819 $self->set_graphics;
23 20 50       40 $self->set_transform($tf) if $tf;
24 20         72 $xo->circle( $cx, $cy, $r );
25 20         42537 $self->_paintsub->();
26              
27 20         667 $self->_dbg( "- xo restore" );
28 20         76 $xo->restore;
29 20         574 $self->css_pop;
30             }
31              
32              
33             1;