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   998 use v5.26;
  2         5  
4 2     2   9 use Object::Pad;
  2         3  
  2         30  
5 2     2   171 use utf8;
  2         2  
  2         8  
6 2     2   38 use Carp;
  2         1487  
  2         267  
7              
8 1     1   486 class SVGPDF::Circle :isa(SVGPDF::Element);
  1         24  
  1         117  
9              
10 20     20 0 29 method process () {
  20         29  
  20         21  
11 20         47 my $atts = $self->atts;
12 20         41 my $xo = $self->xo;
13 20 50       58 return if $atts->{omit}; # for testing/debugging.
14              
15 20         53 my ( $cx, $cy, $r, $tf ) =
16             $self->get_params( $atts, qw( cx:H cy:V r:U transform:s ) );
17              
18 20         54 $self->_dbg( $self->name, " cx=$cx cy=$cy r=$r" );
19 20         65 $self->_dbg( "+ xo save" );
20 20         80 $xo->save;
21              
22 20         869 $self->set_graphics;
23 20 50       39 $self->set_transform($tf) if $tf;
24 20         70 $xo->circle( $cx, $cy, $r );
25 20         44453 $self->_paintsub->();
26              
27 20         711 $self->_dbg( "- xo restore" );
28 20         77 $xo->restore;
29 20         662 $self->css_pop;
30             }
31              
32              
33             1;