~ubuntu-branches/ubuntu/raring/bioperl/raring

« back to all changes in this revision

Viewing changes to Bio/Graphics/Glyph/anchored_arrow.pm

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2008-03-18 14:44:57 UTC
  • mfrom: (4 hardy)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20080318144457-1jjoztrvqwf0gruk
* debian/control:
  - Removed MIA Matt Hope (dopey) from the Uploaders field.
    Thank you for your work, Matt. I hope you are doing well.
  - Downgraded some recommended package to the 'Suggests' priority,
    according to the following discussion on Upstream's mail list.
    http://bioperl.org/pipermail/bioperl-l/2008-March/027379.html
    (Closes: #448890)
* debian/copyright converted to machine-readable format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# package to use for drawing an arrow
3
3
 
4
4
use strict;
5
 
use vars '@ISA';
6
 
use Bio::Graphics::Glyph::arrow;
7
 
@ISA = 'Bio::Graphics::Glyph::arrow';
 
5
use base qw(Bio::Graphics::Glyph::arrow);
8
6
 
9
7
sub draw_label {
10
8
  my $self = shift;
42
40
sub arrowheads {
43
41
  my $self = shift;
44
42
  my ($ne,$sw,$base_e,$base_w);
45
 
  my ($x1,$y1,$x2,$y2) = $self->calculate_boundaries(@_);
46
 
 
47
 
  my $gstart  = $x1;
48
 
  my $gend    = $x2;
49
 
  my $pstart  = $self->panel->left;
50
 
  my $pend    = $self->panel->right-1;
51
 
 
52
 
  if ($gstart <= $pstart) {  # off left end
 
43
  my $feature = $self->feature;
 
44
  my $gstart  = $feature->start;
 
45
  my $gend    = $feature->end;
 
46
  my $pstart  = $self->panel->start;
 
47
  my $pend    = $self->panel->end;
 
48
 
 
49
  if (!defined $gstart || $gstart <= $pstart) {  # off left end
53
50
    $sw = 1;
54
51
  }
55
 
  if ($gend >= $pend) { # off right end
 
52
  if (!defined $gend || $gend >= $pend) { # off right end
56
53
    $ne = 1;
57
54
  }
 
55
  ($sw,$ne) = ($ne,$sw) if $self->panel->{flip};
58
56
  return ($sw,$ne,!$sw,!$ne);
59
57
}
60
58
 
130
128
 
131
129
  -tick          draw a scale               0 (false)
132
130
 
133
 
  -rel_coords    use relative coordinates   0 (false)
 
131
  -relative_coords 
 
132
                 use relative coordinates   0 (false)
 
133
                 for scale
 
134
 
 
135
  -relative_coords_offset 
 
136
                 set the relative offset    1 
134
137
                 for scale
135
138
 
136
139
  -no_arrows     don't draw an arrow when   0 (false)