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   1015 use v5.26;
  2         5  
4 2     2   9 use Object::Pad;
  2         3  
  2         8  
5 2     2   169 use utf8;
  2         3  
  2         9  
6 2     2   1633 use Carp;
  2         4  
  2         271  
7              
8 1     1   450 class SVGPDF::Circle :isa(SVGPDF::Element);
  1         2  
  1         165  
9              
10 20     20 0 37 method process () {
  20         42  
  20         20  
11 20         62 my $atts = $self->atts;
12 20         46 my $xo = $self->xo;
13 20 50       41 return if $atts->{omit}; # for testing/debugging.
14              
15 20         56 my ( $cx, $cy, $r, $tf ) =
16             $self->get_params( $atts, qw( cx:H cy:V r:U transform:s ) );
17              
18 20         49 $self->_dbg( $self->name, " cx=$cx cy=$cy r=$r" );
19 20         86 $self->_dbg( "+ xo save" );
20 20         82 $xo->save;
21              
22 20         838 $self->set_graphics;
23 20 50       40 $self->set_transform($tf) if $tf;
24 20         76 $xo->circle( $cx, $cy, $r );
25 20         44972 $self->_paintsub->();
26              
27 20         703 $self->_dbg( "- xo restore" );
28 20         76 $xo->restore;
29 20         581 $self->css_pop;
30             }
31              
32              
33             1;