blib/lib/Bio/Graphics/Glyph/crossbox.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
my_description
2.0
draw_component
2.0
BEGIN
2.0
CRAP 2.0
1 package Bio::Graphics::Glyph::crossbox;
2  
3 use strict;
4 use base qw(Bio::Graphics::Glyph::generic);
5  
6 sub my_description {
7 "This is a box with an 'X' inside the glyph."
8 }
9  
10 # override draw_component to draw a crossed box rather than empty
11 sub draw_component {
12 my $self = shift;
13 my $gd = shift;
14 my $fg = $self->fgcolor;
15 my ($left,$top) = @_;
16 my($x1,$y1,$x2,$y2) = $self->bounds(@_);
17 $self->filled_box($gd,
18 $x1, $y1,
19 $x2, $y2);
20  
21 $gd->line($x1,$y1,$x2,$y2,$fg);
22 $gd->line($x1,$y2,$x2,$y1,$fg);
23 }
24  
25  
26 1;
27  
28 __END__