1
package Bio::Graphics::Glyph::christmas_arrow;
4
use base qw(Bio::Graphics::Glyph::generic);
21
my ($x1,$y1,$x2,$y2) = $self->calculate_boundaries(@_);
23
my $fg = $self->fgcolor;
25
my $radius = defined $self->option('radius') ? $self->option('radius') : $self->default_radius ();
27
$gd->filledEllipse($x1+$radius, $y2-$radius, 2*$radius, 2*$radius, $fg);
29
my $length = defined $self->option('length') ? $self->option('length') : $self->default_length();
31
my $angle = deg2rad(30);
37
$gd->line($x1+$radius, $y2-$radius, $x1+$radius, $y1+$dy, $fg);
39
return if ($x2-$x1 <= $radius);
41
$x2 = $x1+$radius+$length;
42
$gd->line($x1+$radius, $midY, $x2, $midY, $fg);
43
$gd->line($x2, $midY, $x2-$dx, $y1, $fg);
44
$gd->line($x2, $midY, $x2-$dx, $y1+2*$dy, $fg);
55
Bio::Graphics::Glyph::christmas_arrow - The "christmas arrow" glyph
59
See L<Bio::Graphics::Panel> and L<Bio::Graphics::Glyph>.
63
This glyph draws an arrow which has a circle ("christmas ball")
68
In addition to the common options, the following glyph-specific
69
options are recognized:
71
Option Description Default
72
------ ----------- -------
74
-radius Radius of the circle 4
77
-length Length of the arrow 20
79
-height Standard option, but 10
88
L<Bio::Graphics::Panel>,
89
L<Bio::Graphics::Glyph>,
90
L<Bio::Graphics::Glyph::arrow>,
91
L<Bio::Graphics::Glyph::cds>,
92
L<Bio::Graphics::Glyph::crossbox>,
93
L<Bio::Graphics::Glyph::diamond>,
94
L<Bio::Graphics::Glyph::dna>,
95
L<Bio::Graphics::Glyph::dot>,
96
L<Bio::Graphics::Glyph::ellipse>,
97
L<Bio::Graphics::Glyph::extending_arrow>,
98
L<Bio::Graphics::Glyph::generic>,
99
L<Bio::Graphics::Glyph::graded_segments>,
100
L<Bio::Graphics::Glyph::heterogeneous_segments>,
101
L<Bio::Graphics::Glyph::line>,
102
L<Bio::Graphics::Glyph::pinsertion>,
103
L<Bio::Graphics::Glyph::primers>,
104
L<Bio::Graphics::Glyph::rndrect>,
105
L<Bio::Graphics::Glyph::segments>,
106
L<Bio::Graphics::Glyph::ruler_arrow>,
107
L<Bio::Graphics::Glyph::toomany>,
108
L<Bio::Graphics::Glyph::transcript>,
109
L<Bio::Graphics::Glyph::transcript2>,
110
L<Bio::Graphics::Glyph::translation>,
111
L<Bio::Graphics::Glyph::triangle>,
120
Vsevolod (Simon) Ilyushchenko E<lt>simonf@cshl.eduE<gt>.
122
Copyright (c) 2004 Cold Spring Harbor Laboratory
124
This library is free software; you can redistribute it and/or modify
125
it under the same terms as Perl itself. See DISCLAIMER.txt for
126
disclaimers of warranty.