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

filter: Statementstmt 0.0% 0 / 14 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 22 CC 2 SCAR 12.8
CC
2
Cov
0%
draw_component
6.0
my_description
2.0
BEGIN
2.0
CRAP 3.6
1 package Bio::Graphics::Glyph::ellipse;
2  
3 use strict;
4 use base qw(Bio::Graphics::Glyph::generic);
5  
6 sub my_description {
7 return <<END;
8 This glyph draws an oval instead of a box; otherwise it is similar to
9 the "generic" or "box" glyphs. The width of the oval is determined by
10 the feature width, and the height by the -height option.
11 END
12 }
13  
14  
15 # override draw_component to draw an oval rather than a rectangle (weird)
16 sub draw_component {
17 my $self = shift;
18 my $gd = shift;
19 my ($left,$top) = @_;
20 my($x1,$y1,$x2,$y2) = $self->bounds(@_);
21 $self->filled_oval($gd,
22 $x1, $y1,
23 $x2, $y2);
24  
25 $self->draw_label($gd,@_) if $self->option('label');
26 }
27  
28 1;
29  
30 __END__