Branch Coverage

blib/lib/SDLx/Sprite.pm
Criterion Covered Total %
branch 35 62 56.4


line true false branch
21 0 11 if (exists $options{'surface'}) { }
9 2 elsif (exists $options{'image'}) { }
2 0 elsif (exists $options{'width'} and $options{'height'}) { }
42 0 11 unless %options
45 0 8 if exists $options{'rect'} and exists $options{'x'} || exists $options{'y'}
48 0 9 if exists $options{'image'} and exists $options{'surface'}
53 0 11 if exists $options{'x'}
54 0 11 if exists $options{'y'}
55 0 11 if exists $options{'rotation'}
56 0 11 if exists $options{'alpha_key'}
57 0 11 if exists $options{'alpha'}
69 8 3 exists $options{'rect'} ? :
74 2 9 exists $options{'clip'} ? :
83 0 2 unless $self->{'orig_surface'}
92 0 13 unless $surface
110 60 11 unless $rect
119 161 11 unless $clip
127 0 2 if (defined $x)
137 0 2 if (defined $y)
163 0 3 unless ref SDL::Video::get_video_surface()
166 2 1 unless $self->{'alpha_key'}
169 0 3 if (SDL::Video::set_color_key($self->surface, 4096, $color) < 0)
179 2 2 if $value < 1 and $value > 0
181 0 4 if $value < 0
182 0 4 if $value > 255
186 0 4 if (SDL::Video::set_alpha($self->surface, $flags, $value) < 0)
196 0 0 if ($angle and $self->{'orig_surface'})
202 0 0 unless my $rotated = SDL::GFX::Rotozoom::surface($self->{'orig_surface'}, $angle, 1, defined $smooth && $smooth != 0)
210 0 0 if ($self->{'alpha_key'}) { }
224 0 0 if $self->{'alpha'}
233 20 51 if ($surface)