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

filter: Statementstmt 0.0% 0 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 15 CC 1 SCAR 6.9
CC
1
Cov
0%
draw_repeating_shape
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Bio::Graphics::Glyph::saw_teeth;
2 # DAS-compatible package to use for drawing a line of saw teeth
3  
4 use strict;
5 use base qw(Bio::Graphics::Glyph::repeating_shape);
6  
7 sub draw_repeating_shape
8 {
9 my ($self, $gd, $x1, $y1, $x2, $y2, $fg) = @_;
10
11 my $midX = ($x2-$x1) / 2 + $x1;
12 $gd->line($x1,$y2,$midX,$y1,$fg);
13 $gd->line($midX,$y1,$x2,$y2,$fg);
14 }
15  
16 1;
17  
18 __END__