Bio::Graphics::Glyph::toomany - The "too many to show" glyph


Bio-Graphics documentation Contained in the Bio-Graphics distribution.

Index


Code Index:

NAME

Top

Bio::Graphics::Glyph::toomany - The "too many to show" glyph

SYNOPSIS

Top

  See L<Bio::Graphics::Panel> and L<Bio::Graphics::Glyph>.

DESCRIPTION

Top

This glyph is intended for features that are too dense to show properly. Mostly a placeholder, it currently shows a filled oval. If you choose a bump of 0, the ovals will overlap, to give a cloud effect.

OPTIONS

There are no glyph-specific options.

BUGS

Top

Please report them.

SEE ALSO

Top

Bio::Graphics::Panel, Bio::Graphics::Glyph, Bio::Graphics::Glyph::arrow, Bio::Graphics::Glyph::cds, Bio::Graphics::Glyph::crossbox, Bio::Graphics::Glyph::diamond, Bio::Graphics::Glyph::dna, Bio::Graphics::Glyph::dot, Bio::Graphics::Glyph::ellipse, Bio::Graphics::Glyph::extending_arrow, Bio::Graphics::Glyph::generic, Bio::Graphics::Glyph::graded_segments, Bio::Graphics::Glyph::heterogeneous_segments, Bio::Graphics::Glyph::line, Bio::Graphics::Glyph::pinsertion, Bio::Graphics::Glyph::primers, Bio::Graphics::Glyph::rndrect, Bio::Graphics::Glyph::segments, Bio::Graphics::Glyph::ruler_arrow, Bio::Graphics::Glyph::toomany, Bio::Graphics::Glyph::transcript, Bio::Graphics::Glyph::transcript2, Bio::Graphics::Glyph::translation, Bio::Graphics::Glyph::triangle, Bio::DB::GFF, Bio::SeqI, Bio::SeqFeatureI, Bio::Das, GD

AUTHOR

Top

Allen Day <day@cshl.org>.

Copyright (c) 2001 Cold Spring Harbor Laboratory

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty.


Bio-Graphics documentation Contained in the Bio-Graphics distribution.

package Bio::Graphics::Glyph::toomany;
# DAS-compatible package to use for drawing a box

use strict;
use base qw(Bio::Graphics::Glyph::generic);

# draw the thing onto a canvas
# this definitely gets overridden
sub draw {
  my $self = shift;
  my $gd   = shift;
  my ($left,$top) = @_;

  my ($x1,$y1,$x2,$y2) = $self->calculate_boundaries($left,$top);

#  $self->filled_oval($gd,$x1,$y1,$x2,$y2);
  for (my $m = 3;$m > 0;$m--){
    my $stack = $m * $self->height / 2;
    $self->unfilled_box($gd,$x1-$stack,$y1-$stack,$x2-$stack,$y2-$stack);
  }

  # add a label if requested
  $self->draw_label($gd,$left,($top-($self->height*1.1))) if $self->option('label');
}

sub label {
  return "too many to display";
}

1;

__END__