1
package Bio::Graphics::Glyph::ex;
3
# $Id: ex.pm,v 1.5.8.1 2006/10/02 23:10:19 sendu Exp $
4
# Non object-oriented utilities used here-and-there in Bio::Graphics modules
8
Bio::Graphics::Glyph::ex - the "ex", or "crossed box" glyph
13
use base 'Bio::Graphics::Glyph::generic';
15
# override draw_component to draw a crossed box rather than empty
19
my $fg = $self->fgcolor;
21
my($x1,$y1,$x2,$y2) = $self->bounds(@_);
24
if($self->option('point')){
25
my $arm = int($self->height/2);
26
my $minx = $x2 > $x1 ? $x1 : $x2;
27
my $centerx = abs($x2 - $x1) + $minx;
28
my $miny = $y2 > $y1 ? $y1 : $y2;
29
my $centery = abs($y2 - $y1) + $miny;
30
$gd->line($centerx-$arm, $centery-$arm, $centerx+$arm, $centery+$arm, $fg);
31
$gd->line($centerx-$arm, $centery+$arm, $centerx+$arm, $centery-$arm, $fg);
34
$gd->line($x1,$y1,$x2,$y2,$fg);
35
$gd->line($x1,$y2,$x2,$y1,$fg);
46
Bio::Graphics::Glyph::crossbox - The "crossbox" glyph
50
See L<Bio::Graphics::Panel> and L<Bio::Graphics::Glyph>.
54
This is a box with an 'X' inside glyph.
59
The following options are standard among all Glyphs. See
60
L<Bio::Graphics::Glyph> for a full explanation.
62
Option Description Default
63
------ ----------- -------
65
-fgcolor Foreground color black
67
-outlinecolor Synonym for -fgcolor
69
-bgcolor Background color turquoise
71
-fillcolor Synonym for -bgcolor
73
-linewidth Line width 1
75
-height Height of glyph 10
77
-font Glyph font gdSmallFont
79
-connector Connector type 0 (false)
84
-label Whether to draw a label 0 (false)
86
-description Whether to draw a description 0 (false)
88
-hilite Highlight color undef (no color)
96
L<Bio::Graphics::Panel>,
97
L<Bio::Graphics::Glyph>,
98
L<Bio::Graphics::Glyph::arrow>,
99
L<Bio::Graphics::Glyph::cds>,
100
L<Bio::Graphics::Glyph::crossbox>,
101
L<Bio::Graphics::Glyph::diamond>,
102
L<Bio::Graphics::Glyph::dna>,
103
L<Bio::Graphics::Glyph::dot>,
104
L<Bio::Graphics::Glyph::ellipse>,
105
L<Bio::Graphics::Glyph::extending_arrow>,
106
L<Bio::Graphics::Glyph::generic>,
107
L<Bio::Graphics::Glyph::graded_segments>,
108
L<Bio::Graphics::Glyph::heterogeneous_segments>,
109
L<Bio::Graphics::Glyph::line>,
110
L<Bio::Graphics::Glyph::pinsertion>,
111
L<Bio::Graphics::Glyph::primers>,
112
L<Bio::Graphics::Glyph::rndrect>,
113
L<Bio::Graphics::Glyph::segments>,
114
L<Bio::Graphics::Glyph::ruler_arrow>,
115
L<Bio::Graphics::Glyph::toomany>,
116
L<Bio::Graphics::Glyph::transcript>,
117
L<Bio::Graphics::Glyph::transcript2>,
118
L<Bio::Graphics::Glyph::translation>,
119
L<Bio::Graphics::Glyph::triangle>,
128
Allen Day E<lt>day@cshl.orgE<gt>.
130
Copyright (c) 2001 Cold Spring Harbor Laboratory
132
This library is free software; you can redistribute it and/or modify
133
it under the same terms as Perl itself. See DISCLAIMER.txt for
134
disclaimers of warranty.