Branch Coverage

blib/lib/Image/Base/X11/Protocol/Drawable.pm
Criterion Covered Total %
branch 15 164 9.1


line true false branch
41 0 0 if (ref $class)
116 0 0 if (my $gc = delete $self->{'-gc_created'})
142 0 0 if (not exists $self->{$key} and defined(my $rsubr = $get_geometry{$key}))
147 0 0 if (defined(my $screen = X11::Protocol::Other::root_to_screen($X, $drawable)))
154 0 0 unless (defined $self->{$gkey})
158 0 0 unless (defined $self->{'-screen'})
168 0 0 if (exists $params{'-pixmap'})
171 0 0 if (exists $params{'-window'})
175 0 0 if (exists $params{'-drawable'})
180 0 0 if (exists $params{'-colormap'})
183 0 0 if (exists $params{'-gc'})
203 0 0 if ($x < 0 or $y < 0 or $x > 32767 or $y > 32767)
210 0 0 if (@_ == 4)
219 0 0 unless (ref $reply[0])
220 0 0 if ($reply[0] eq 'Match')
227 0 0 unless (defined $self->{'-depth'})
235 0 0 if ($X->num('Significance', $X->{'image_byte_order'}) == 0)
248 0 0 if (defined($colour = $self->pixel_to_colour($pixel)))
251 0 0 if (my $colormap = $self->{'-colormap'})
275 0 0 if (@points >= $maxpoints)
281 0 0 if ($x >= 0 and $y >= 0 and $x <= 32767 and $y <= 32767)
286 0 0 if (@points)
294 0 0 unless ($x1, $y1, $x2, $y2) = _line_clip($x1, $y1, $x2, $y2)
305 0 0 unless ($x2 >= 0 and $y2 >= 0 and $x1 <= 32767 and $y1 <= 32767)
312 0 0 if ($x1 < -1)
313 0 0 if ($y1 < -1)
318 0 0 if ($x2 > 32768)
319 0 0 if ($y2 > 32768)
321 0 0 if ($x1 == $x2 or $y1 == $y2) { }
331 0 0 $fill ? :
343 0 0 $fill ? :
354 0 0 unless ($x2 >= 0 and $y2 >= 0 and $x1 <= 32767 and $y1 <= 32767)
360 0 0 if ($x1 < -1)
361 0 0 if ($y1 < -1)
363 0 0 if ($x2 > 32768)
364 0 0 if ($y2 > 32768)
366 0 0 if (not $fill and $x1 == $x2 || $y1 == $y2) { }
389 0 0 if (@$aref)
441 0 0 if ($w <= 1 or $h <= 1)
447 0 0 unless ($x2 >= 0 and $y2 >= 0 and $x1 <= 32767 and $y1 <= 32767)
452 0 0 if ($x1 < -32768 or $x2 > 32767 or $y1 < -32768 or $y2 > 32767)
462 0 0 if ($fill)
472 0 0 if ($x1 == $x2 and $y1 == $y2)
496 0 0 if ($fill) { }
503 0 0 $xmid_floor == $xmid_ceil ? :
0 0 $ymid_floor == $ymid_ceil ? :
0 0 $xmid_floor == $xmid_ceil ? :
0 0 $ymid_floor == $ymid_ceil ? :
521 0 0 if (@xy)
568 0 0 if ($colour eq 'None')
572 0 0 if ($colour ne $self->{'-gc_colour'})
577 0 0 if ($pixel != $self->{'-gc_pixel'})
580 0 0 if ($gc) { }
600 0 0 if ($colour =~ /^^\d+$/)
603 0 0 if ($colour eq 'set')
607 0 0 if ($colour eq 'clear')
610 0 0 if (defined(my $pixel = $self->{'-colour_to_pixel'}{$colour}))
650 0 0 if ($err_seq != $seq)
659 0 0 if ($err)
668 0 0 if ($pixel_to_colour)
675 0 0 if defined $colour_to_pixel->{$colour}
679 0 0 if (my $field = $colour_to_screen_field{$colour})
680 0 0 if (my $screen_info = X11::Protocol::Other::default_colormap_to_screen_info($X, $colormap))
682 0 0 if ($pixel_to_colour)
694 0 0 if (my(@rgb) = X11::Protocol::Other::hexstr_to_rgb($colour)) { }
705 0 0 if (@queued > 256)
713 0 0 if (@failed_colours)
734 0 0 unless (_line_any_positive($x1, $y1, $x2, $y2))
740 0 0 unless (my($x1new, $y1new) = _line_end_clip($x1, $y1, $x2, $y2))
744 0 0 unless ($x2, $y2) = _line_end_clip($x2, $y2, $x1, $y1)
785 7 4 if ($x2 < -32768 or $x2 > 32767) { }
787 2 5 unless my $xlen = $x2 - $x1
789 2 3 $x2 < -32768 ? :
798 4 5 if ($y2new < -32768 or $y2new > 32767)
799 2 2 unless my $ylen = $y2 - $y1
801 1 1 $y2 < -32768 ? :
804 0 2 if ($x2new < -32768 or $x2new > 32767)
875 7 11 if $x2 < $x1
948 0 0 if ($y <= 32767) { }
959 0 0 if ($yprev <= 32767) { }
977 0 0 if ($ynext <= 32767) { }
996 0 0 if (@$aref == 2)