[Bioperl-guts-l] bioperl-live/Bio/Graphics/Glyph generic.pm, 1.47, 1.48

Lincoln Stein lstein at dev.open-bio.org
Tue Jan 16 22:54:18 EST 2007


Update of /home/repository/bioperl/bioperl-live/Bio/Graphics/Glyph
In directory dev.open-bio.org:/tmp/cvs-serv2489/Bio/Graphics/Glyph

Modified Files:
	generic.pm 
Log Message:
fixed (and grossly simplified) behavior of print_description()

Index: generic.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Graphics/Glyph/generic.pm,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** generic.pm	16 Jan 2007 21:21:40 -0000	1.47
--- generic.pm	17 Jan 2007 03:54:16 -0000	1.48
***************
*** 304,319 ****
    }
  }
  sub draw_description {
    my $self = shift;
!   my ($gd,$left,$top,$partno,$total_parts) = @_;
    my $label = $self->description or return;
!   my $x = $self->left + $left;
!   $x   += $self->pad_left;  # offset to beginning of drawn part of feature
!   $x = $self->panel->left + 1 if $x <= $self->panel->left;
!   my $dy= $self->part_labels ? $self->font->height : 0;
    $gd->string($self->descfont,
! 	      $x,
! 	      $self->bottom - $self->pad_bottom + $top + $dy,
! #	      $self->bottom + $dy + $self->pad_bottom - $self->descfont->height + 2,
  	      $label,
  	      $self->font2color);
--- 304,336 ----
    }
  }
+ 
+ # sub draw_description {
+ #   my $self = shift;
+ #   my ($gd,$left,$top,$partno,$total_parts) = @_;
+ #   my $label = $self->description or return;
+ #   my $x = $self->left + $left;
+ #   $x   += $self->pad_left;  # offset to beginning of drawn part of feature
+ #   $x = $self->panel->left + 1 if $x <= $self->panel->left;
+ #   my $dy= $self->part_labels ? $self->font->height : 0;
+ #   $gd->string($self->descfont,
+ # 	      $x,
+ # 	      $self->bottom - $self->pad_bottom + $top + $dy,
+ # 	      $label,
+ # 	      $self->font2color);
+ # }
+ 
  sub draw_description {
    my $self = shift;
!   my ($gd,$dx,$dy,$partno,$total_parts) = @_;
    my $label = $self->description or return;
!   my ($left,$top,$right,$bottom) = $self->bounds($dx,$dy);
!   $left    -= $self->pad_left; # offset to beginning of drawn part of feature
!   $bottom  += $self->pad_bottom;
!   $bottom  -= $self->labelheight;
!   $bottom  -= $self->labelheight if $self->part_labels && $self->label_position eq 'top';
! 
    $gd->string($self->descfont,
! 	      $left,
! 	      $bottom,
  	      $label,
  	      $self->font2color);



More information about the Bioperl-guts-l mailing list