Branch Coverage

blib/lib/Graphics/Fig/Polyline.pm
Criterion Covered Total %
branch 93 138 67.3


line true false branch
61 8 0 if (defined $value and $value =~ /^$pattern$/)
69 4 4 if (defined $5)
70 0 4 if ($5 eq 'dpcm') { }
0 4 elsif ($5 eq 'dpm') { }
81 4 4 if (not defined $dpi and defined $y)
82 1 3 if ($state->{'best_form'} < 1)
92 3 1 if (defined $dpi and not defined $y)
93 3 0 if ($state->{'best_form'} < 2)
103 1 0 if (defined $dpi and defined $y)
104 1 0 if ($state->{'best_form'} < 3)
141 3 2 if ($fromImage and ref $value eq 'ARRAY') { }
146 0 0 unless (&_parseResolution($value, $state) or $fromImage)
354 0 11 if ($@)
363 0 11 if (not defined($temp = $parameters{'points'}) or scalar(@{$temp;} < 2))
401 0 29 if ($@)
410 18 11 if (not defined $newPoints) { }
411 0 18 unless (defined $parameters{'distance'})
414 0 18 unless (defined $parameters{'heading'})
425 0 11 if (defined $parameters{'distance'})
428 0 11 if (defined $parameters{'heading'})
431 0 11 if (scalar @{$newPoints;} == 0)
442 20 9 if (defined($self = do { $tos }->{'openLineto'}))
452 0 12 if (not defined $self && defined $finalPoint or $parameters{'detachedLineto'} or do { $position }->[0] != do { $finalPoint }->[0] or do { $position }->[1] != do { $finalPoint }->[1] or do { $self }->{'lineStyle'} != $parameters{'lineStyle'} or do { $self }->{'lineThickness'} != $parameters{'lineThickness'} or do { $self }->{'penColor'} != $parameters{'penColor'} or do { $self }->{'fillColor'} != $parameters{'fillColor'} or do { $self }->{'depth'} != $parameters{'depth'} or do { $self }->{'areaFill'} != $parameters{'areaFill'} or do { $self }->{'styleVal'} != $parameters{'styleVal'} or do { $self }->{'joinStyle'} != $parameters{'joinStyle'} or do { $self }->{'capStyle'} != $parameters{'capStyle'} or Graphics::Fig::Parameters::compareArrowParameters($self, \%parameters) != 0)
508 0 17 if ($@)
518 0 17 if (defined $cornerRadius and $cornerRadius != 0) { }
529 9 8 if (defined($temp = $parameters{'points'})) { }
8 0 elsif (defined(my $width = $parameters{'width'}) and defined(my $height = $parameters{'height'})) { }
532 0 9 if (defined $parameters{'width'})
535 0 9 if (defined $parameters{'height'})
538 0 9 if (defined $parameters{'center'})
541 0 9 if (scalar @{$temp;} == 1) { }
9 0 elsif (scalar @{$temp;} == 2) { }
557 3 5 if (defined $parameters{'center'}) { }
600 0 7 if ($@)
614 5 2 if (defined($n = $parameters{'n'})) { }
623 0 5 if ($n < 3)
630 1 4 if (defined $parameters{'center'}) { }
639 1 4 if (defined $parameters{'points'}) { }
641 0 1 if (scalar @{$points;} != 1)
647 0 1 if (defined $parameters{'r'})
650 0 1 if (defined $parameters{'rotation'})
655 0 4 unless (defined($r = $parameters{'r'}))
658 2 2 if (defined $parameters{'rotation'})
681 0 2 if (scalar @{$points;} < 3)
684 0 2 if (defined $parameters{'r'})
687 0 2 if (defined $parameters{'rotation'})
725 0 19 if ($@)
734 0 19 unless (defined $filename)
737 0 19 if ($filename =~ /\n/)
752 13 6 if (defined($temp = $parameters{'points'})) { }
755 0 13 if (defined $parameters{'width'})
758 0 13 if (defined $parameters{'height'})
761 0 13 if (defined $parameters{'center'})
764 0 13 if (scalar @{$temp;} == 1) { }
13 0 elsif (scalar @{$temp;} == 2) { }
782 1 5 if (defined $parameters{'center'}) { }
795 5 1 unless (defined $width and defined $height)
797 0 5 if (my $error = do { $info }->{'error'})
800 3 2 unless (defined $resolution)
803 0 5 unless ref $resolution eq 'ARRAY'
806 0 5 if (not defined $nWidth or $nWidth <= 0 or not defined $nHeight or $nHeight <= 0)
812 1 4 if (defined $width) { }
1 3 elsif (defined $height) { }
866 3 14 if (sin($rotation) * cos($rotation) != 0 and $subtype == 2 || $subtype == 4)
887 4 2 if ($subtype == 5)
889 2 2 if (do { $scale }->[0] * do { $scale }->[1] < 0)
938 18 53 defined do { $self }->{'fArrow'} ? :
2 69 defined do { $self }->{'bArrow'} ? :
940 19 52 if ($subtype == 5)