0
|
1 package Bio::Graphics::Glyph::crossbox;
|
|
2
|
|
3 use strict;
|
|
4 use vars '@ISA';
|
|
5 @ISA = 'Bio::Graphics::Glyph::generic';
|
|
6 use Bio::Graphics::Glyph::generic;
|
|
7
|
|
8 # override draw_component to draw a crossed box rather than empty
|
|
9 sub draw_component {
|
|
10 my $self = shift;
|
|
11 my $gd = shift;
|
|
12 my $fg = $self->fgcolor;
|
|
13 my ($left,$top) = @_;
|
|
14 my($x1,$y1,$x2,$y2) = $self->bounds(@_);
|
|
15 $self->unfilled_box($gd,
|
|
16 $x1, $y1,
|
|
17 $x2, $y2);
|
|
18
|
|
19 if ($self->option('bgcolor')){
|
|
20 my $c = $self->color('bgcolor');
|
|
21 my $xmid = ($x2+$x1)/2;
|
|
22 my $ymid = ($y2+$y1)/2;
|
|
23 $gd->fill($xmid,$ymid,$c);
|
|
24 }
|
|
25
|
|
26 $gd->line($x1,$y1,$x2,$y2,$fg);
|
|
27 $gd->line($x1,$y2,$x2,$y1,$fg);
|
|
28 }
|
|
29
|
|
30
|
|
31 1;
|
|
32
|
|
33 __END__
|
|
34
|
|
35 =head1 NAME
|
|
36
|
|
37 Bio::Graphics::Glyph::crossbox - The "crossbox" glyph
|
|
38
|
|
39 =head1 SYNOPSIS
|
|
40
|
|
41 See L<Bio::Graphics::Panel> and L<Bio::Graphics::Glyph>.
|
|
42
|
|
43 =head1 DESCRIPTION
|
|
44
|
|
45 This is a box with an 'X' inside the glyph.
|
|
46
|
|
47 =head2 OPTIONS
|
|
48
|
|
49 The following options are standard among all Glyphs. See
|
|
50 L<Bio::Graphics::Glyph> for a full explanation.
|
|
51
|
|
52 Option Description Default
|
|
53 ------ ----------- -------
|
|
54
|
|
55 -fgcolor Foreground color black
|
|
56
|
|
57 -outlinecolor Synonym for -fgcolor
|
|
58
|
|
59 -bgcolor Background color turquoise
|
|
60
|
|
61 -fillcolor Synonym for -bgcolor
|
|
62
|
|
63 -linewidth Line width 1
|
|
64
|
|
65 -height Height of glyph 10
|
|
66
|
|
67 -font Glyph font gdSmallFont
|
|
68
|
|
69 -connector Connector type 0 (false)
|
|
70
|
|
71 -connector_color
|
|
72 Connector color black
|
|
73
|
|
74 -label Whether to draw a label 0 (false)
|
|
75
|
|
76 -description Whether to draw a description 0 (false)
|
|
77
|
|
78 =head1 BUGS
|
|
79
|
|
80 Please report them.
|
|
81
|
|
82 =head1 SEE ALSO
|
|
83
|
|
84 L<Bio::Graphics::Panel>,
|
|
85 L<Bio::Graphics::Glyph>,
|
|
86 L<Bio::Graphics::Glyph::arrow>,
|
|
87 L<Bio::Graphics::Glyph::cds>,
|
|
88 L<Bio::Graphics::Glyph::crossbox>,
|
|
89 L<Bio::Graphics::Glyph::diamond>,
|
|
90 L<Bio::Graphics::Glyph::dna>,
|
|
91 L<Bio::Graphics::Glyph::dot>,
|
|
92 L<Bio::Graphics::Glyph::ellipse>,
|
|
93 L<Bio::Graphics::Glyph::extending_arrow>,
|
|
94 L<Bio::Graphics::Glyph::generic>,
|
|
95 L<Bio::Graphics::Glyph::graded_segments>,
|
|
96 L<Bio::Graphics::Glyph::heterogeneous_segments>,
|
|
97 L<Bio::Graphics::Glyph::line>,
|
|
98 L<Bio::Graphics::Glyph::pinsertion>,
|
|
99 L<Bio::Graphics::Glyph::primers>,
|
|
100 L<Bio::Graphics::Glyph::rndrect>,
|
|
101 L<Bio::Graphics::Glyph::segments>,
|
|
102 L<Bio::Graphics::Glyph::ruler_arrow>,
|
|
103 L<Bio::Graphics::Glyph::toomany>,
|
|
104 L<Bio::Graphics::Glyph::transcript>,
|
|
105 L<Bio::Graphics::Glyph::transcript2>,
|
|
106 L<Bio::Graphics::Glyph::translation>,
|
|
107 L<Bio::Graphics::Glyph::triangle>,
|
|
108 L<Bio::DB::GFF>,
|
|
109 L<Bio::SeqI>,
|
|
110 L<Bio::SeqFeatureI>,
|
|
111 L<Bio::Das>,
|
|
112 L<GD>
|
|
113
|
|
114 =head1 AUTHOR
|
|
115
|
|
116 Allen Day E<lt>day@cshl.orgE<gt>.
|
|
117
|
|
118 Copyright (c) 2001 Cold Spring Harbor Laboratory
|
|
119
|
|
120 This library is free software; you can redistribute it and/or modify
|
|
121 it under the same terms as Perl itself. See DISCLAIMER.txt for
|
|
122 disclaimers of warranty.
|
|
123
|
|
124 =cut
|