[Bioperl-l] is Bio::Graphics::Glyph::line supposed to draw description?

ben berman benb at fruitfly.org
Mon Aug 9 01:47:02 EDT 2004


I was trying to draw a description string with the 
Bio::Graphics::Glyph::line glyph, but it doesn't seem to work.  I 
checked the latest version (1.5) , and the draw() function is as 
follows:

> sub draw {
>   my $self = shift;
>   my $gd = shift;
>   my ($x1,$y1,$x2,$y2) = $self->calculate_boundaries(@_);
>
>   my $fg = $self->fgcolor;
>   my $a2 = $self->SUPER::height/2;
>   my $center = $y1+$a2;
>
>   $gd->line($x1,$center,$x2,$center,$fg);
>   # add a label if requested
>   $self->draw_label($gd, at _) if $self->option('label');
>
> }

The arrow glyph, which does seem to implement the description string 
correctly, has the following:

>   # add a label if requested
>   $self->draw_label($gd,$dx,$dy)       if $self->option('label');
>   $self->draw_description($gd,$dx,$dy) if $self->option('description');
> }
>

Is this omission by design?  Based on the documentation for 
Panel::add_track, i kind of expected all glyphs to implement this if 
possible.

i would commit the change myself, but i want to be cautious since i'm 
not an active contributor.

thanks,
ben.



More information about the Bioperl-l mailing list