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   1360 use v5.26;
  2         7  
4 2     2   11 use Object::Pad;
  2         3  
  2         15  
5 2     2   260 use utf8;
  2         3  
  2         3254  
6 2     2   98 use Carp;
  2         2  
  2         494  
7              
8 1     1   491 class SVGPDF::Circle :isa(SVGPDF::Element);
  1         3  
  1         135  
9              
10 8     8 0 15 method process () {
  8         24  
  8         12  
11 8         31 my $atts = $self->atts;
12 8         25 my $xo = $self->xo;
13 8 50       28 return if $atts->{omit}; # for testing/debugging.
14              
15 8         28 my ( $cx, $cy, $r, $tf ) =
16             $self->get_params( $atts, qw( cx:H cy:V r:U transform:s ) );
17              
18 8         26 $self->_dbg( $self->name, " cx=$cx cy=$cy r=$r" );
19 8         39 $self->_dbg( "+ xo save" );
20 8         49 $xo->save;
21              
22 8         436 $self->set_graphics;
23 8 50       23 $self->set_transform($tf) if $tf;
24 8         49 $xo->circle( $cx, $cy, $r );
25 8         27181 $self->_paintsub->();
26              
27 8         381 $self->_dbg( "- xo restore" );
28 8         38 $xo->restore;
29 8         390 $self->css_pop;
30             }
31              
32              
33             1;