1
package Bio::Graphics::Glyph::crossbox;
4
use base qw(Bio::Graphics::Glyph::generic);
6
# override draw_component to draw a crossed box rather than empty
10
my $fg = $self->fgcolor;
12
my($x1,$y1,$x2,$y2) = $self->bounds(@_);
13
$self->unfilled_box($gd,
17
if ($self->option('bgcolor')){
18
my $c = $self->color('bgcolor');
19
my $xmid = ($x2+$x1)/2;
20
my $ymid = ($y2+$y1)/2;
21
$gd->fill($xmid,$ymid,$c);
24
$gd->line($x1,$y1,$x2,$y2,$fg);
25
$gd->line($x1,$y2,$x2,$y1,$fg);
35
Bio::Graphics::Glyph::crossbox - The "crossbox" glyph
39
See L<Bio::Graphics::Panel> and L<Bio::Graphics::Glyph>.
43
This is a box with an 'X' inside the glyph.
47
The following options are standard among all Glyphs. See
48
L<Bio::Graphics::Glyph> for a full explanation.
50
Option Description Default
51
------ ----------- -------
53
-fgcolor Foreground color black
55
-outlinecolor Synonym for -fgcolor
57
-bgcolor Background color turquoise
59
-fillcolor Synonym for -bgcolor
61
-linewidth Line width 1
63
-height Height of glyph 10
65
-font Glyph font gdSmallFont
67
-connector Connector type 0 (false)
72
-label Whether to draw a label 0 (false)
74
-description Whether to draw a description 0 (false)
76
-hilite Highlight color undef (no color)
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>,
116
Allen Day E<lt>day@cshl.orgE<gt>.
118
Copyright (c) 2001 Cold Spring Harbor Laboratory
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.