Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/Graphics/Glyph/line.pm @ 0:1f6dce3d34e0
Uploaded
author | mahtabm |
---|---|
date | Thu, 11 Apr 2013 02:01:53 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1f6dce3d34e0 |
---|---|
1 package Bio::Graphics::Glyph::line; | |
2 # an arrow without the arrowheads | |
3 | |
4 use strict; | |
5 use vars '@ISA'; | |
6 @ISA = 'Bio::Graphics::Glyph::generic'; | |
7 use Bio::Graphics::Glyph::generic; | |
8 | |
9 sub bottom { | |
10 my $self = shift; | |
11 my $val = $self->SUPER::bottom(@_); | |
12 $val += $self->font->height if $self->option('tick'); | |
13 $val += $self->labelheight if $self->option('label'); | |
14 $val; | |
15 } | |
16 | |
17 sub draw { | |
18 my $self = shift; | |
19 my $gd = shift; | |
20 my ($x1,$y1,$x2,$y2) = $self->calculate_boundaries(@_); | |
21 | |
22 my $fg = $self->fgcolor; | |
23 my $a2 = $self->SUPER::height/2; | |
24 my $center = $y1+$a2; | |
25 | |
26 $gd->line($x1,$center,$x2,$center,$fg); | |
27 # add a label if requested | |
28 $self->draw_label($gd,@_) if $self->option('label'); | |
29 | |
30 } | |
31 | |
32 1; | |
33 | |
34 __END__ | |
35 | |
36 =head1 NAME | |
37 | |
38 Bio::Graphics::Glyph::line - The "line" glyph | |
39 | |
40 =head1 SYNOPSIS | |
41 | |
42 See L<Bio::Graphics::Panel> and L<Bio::Graphics::Glyph>. | |
43 | |
44 =head1 DESCRIPTION | |
45 | |
46 This glyph draws a line parallel to the sequence segment. | |
47 | |
48 =head2 OPTIONS | |
49 | |
50 This glyph takes only the standard options. See | |
51 L<Bio::Graphics::Glyph> for a full explanation. | |
52 | |
53 Option Description Default | |
54 ------ ----------- ------- | |
55 | |
56 -fgcolor Foreground color black | |
57 | |
58 -outlinecolor Synonym for -fgcolor | |
59 | |
60 -bgcolor Background color turquoise | |
61 | |
62 -fillcolor Synonym for -bgcolor | |
63 | |
64 -linewidth Line width 1 | |
65 | |
66 -height Height of glyph 10 | |
67 | |
68 -font Glyph font gdSmallFont | |
69 | |
70 -connector Connector type 0 (false) | |
71 | |
72 -connector_color | |
73 Connector color black | |
74 | |
75 -label Whether to draw a label 0 (false) | |
76 | |
77 -description Whether to draw a description 0 (false) | |
78 | |
79 -strand_arrow Whether to indicate 0 (false) | |
80 strandedness | |
81 | |
82 =head1 BUGS | |
83 | |
84 Please report them. | |
85 | |
86 =head1 SEE ALSO | |
87 | |
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>, | |
112 L<Bio::DB::GFF>, | |
113 L<Bio::SeqI>, | |
114 L<Bio::SeqFeatureI>, | |
115 L<Bio::Das>, | |
116 L<GD> | |
117 | |
118 =head1 AUTHOR | |
119 | |
120 Allen Day E<lt>day@cshl.orgE<gt>. | |
121 | |
122 Copyright (c) 2001 Cold Spring Harbor Laboratory | |
123 | |
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. | |
127 | |
128 =cut |