AcePerl
view release on metacpan or search on metacpan
Ace/Graphics/Glyph/arrow.pm view on Meta::CPAN
$gd->line($x1,$center,$x2,$center,$fg);
if ($sw) { # west arrow
$gd->line($x1,$center,$x1+$a2,$center-$a2,$fg);
$gd->line($x1,$center,$x1+$a2,$center+$a2,$fg);
}
if ($ne) { # east arrow
$gd->line($x2,$center,$x2-$a2,$center+$a2,$fg);
$gd->line($x2,$center,$x2-$a2,$center-$a2,$fg);
}
# add a label if requested
$self->draw_label($gd,@_) if $self->option('label');
}
1;
__END__
=head1 NAME
Ace::Graphics::Glyph::arrow - The "arrow" glyph
=head1 SYNOPSIS
See L<Ace::Graphics::Panel> and L<Ace::Graphics::Glyph>.
=head1 DESCRIPTION
This glyph draws arrows. Depending on options, the arrows can be
labeled, be oriented vertically or horizontally, or can contain major
and minor ticks suitable for use as a scale.
=head2 OPTIONS
In addition to the common options, the following glyph-specific
options are recognized:
Option Description Default
------ ----------- -------
-tick Whether to draw major 0
and minor ticks.
0 = no ticks
1 = major ticks
2 = minor ticks
-parallel Whether to draw the arrow true
parallel to the sequence
or perpendicular to it.
-northeast Whether to draw the true
north or east arrowhead
(depending on orientation)
-southwest Whether to draw the true
south or west arrowhead
(depending on orientation)
Set -parallel to false to display a point-like feature such as a
polymorphism, or to indicate an important location. If the feature
start == end, then the glyph will draw a single arrow at the
designated location:
^
|
Otherwise, there will be two arrows at the start and end:
^ ^
| |
=head1 BUGS
Please report them.
=head1 SEE ALSO
L<Ace::Sequence>, L<Ace::Sequence::Feature>, L<Ace::Graphics::Panel>,
L<Ace::Graphics::Track>, L<Ace::Graphics::Glyph::anchored_arrow>,
L<Ace::Graphics::Glyph::arrow>,
L<Ace::Graphics::Glyph::box>,
L<Ace::Graphics::Glyph::primers>,
L<Ace::Graphics::Glyph::segments>,
L<Ace::Graphics::Glyph::toomany>,
L<Ace::Graphics::Glyph::transcript>,
=head1 AUTHOR
Lincoln Stein <lstein@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.
=cut
( run in 1.219 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )