Branch Coverage

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


line true false branch
19 0 11 if (exists $options{'surface'}) { }
9 2 elsif (exists $options{'image'}) { }
2 0 elsif (exists $options{'width'} and $options{'height'}) { }
40 0 11 unless %options
42 0 8 if exists $options{'rect'} and exists $options{'x'} || exists $options{'y'}
45 0 11 if exists $options{'image'} and exists $options{'surface'}
51 0 11 if exists $options{'x'}
52 0 11 if exists $options{'y'}
53 0 11 if exists $options{'rotation'}
54 0 11 if exists $options{'alpha_key'}
55 0 11 if exists $options{'alpha'}
64 8 3 exists $options{'rect'} ? :
69 2 9 exists $options{'clip'} ? :
81 0 2 unless $$self{'orig_surface'}
90 0 13 unless $surface
108 60 11 unless $rect
117 161 11 unless $clip
125 0 2 if (defined $x)
135 0 2 if (defined $y)
161 0 3 unless ref SDL::Video::get_video_surface()
163 2 1 unless $$self{'alpha_key'}
167 0 3 if (SDL::Video::set_color_key($self->surface, 4096, $color) < 0)
177 2 2 if $value < 1 and $value > 0
179 0 4 if $value < 0
180 0 4 if $value > 255
184 0 4 if (SDL::Video::set_alpha($self->surface, $flags, $value) < 0)
194 0 0 if ($angle and $$self{'orig_surface'})
198 0 0 unless my $rotated = SDL::GFX::Rotozoom::surface($$self{'orig_surface'}, $angle, 1, defined $smooth && $smooth != 0)
208 0 0 if ($$self{'alpha_key'}) { }
222 0 0 if $$self{'alpha'}
231 20 51 if ($surface)