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

Lincoln Stein lstein at cshl.edu
Mon Aug 23 11:21:27 EDT 2004


Sorry it took so long for me to respond to this.  This seems to be an 
oversight.  Please go ahead and commit the obvious fix if someone 
hasn't done so already.

Lincoln

On Monday 09 August 2004 01:47 am, ben berman wrote:
> 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.
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l

-- 
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724


More information about the Bioperl-l mailing list