blib/lib/Bio/Graphics/Glyph/hat.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_connector
2.0
BEGIN
2.0
CRAP 2.0
1 package Bio::Graphics::Glyph::hat;
2 # a simple inverted V (used by DAS)
3  
4 use strict;
5 use base qw(Bio::Graphics::Glyph::line);
6  
7 sub my_description {
8 return <<END;
9 This glyph draws an inverted V spanning the feature.
10 END
11 }
12  
13 sub draw_connector {
14 my $self = shift;
15 my $gd = shift;
16 my ($left,$right,$high,$low) = @_;
17 my $fg = $self->fgcolor;
18 my $center = ($high+$low)/2;
19 my $middle = ($left+$right)/2;
20 $gd->line($left,$center,$middle,$high,$fg);
21 $gd->line($middle,$high,$right,$center,$fg);
22 }
23  
24 1;
25  
26 __END__