~ubuntu-branches/ubuntu/saucy/bioperl/saucy-proposed

« back to all changes in this revision

Viewing changes to Bio/Graphics/Glyph/crossbox.pm

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2009-03-10 07:19:11 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090310071911-fukqzw54pyb1f0bd
Tags: 1.6.0-2
* Removed patch system (not used):
  - removed instuctions in debian/rules;
  - removed quilt from Build-Depends in debian/control.
* Re-enabled tests:
  - uncommented test command in debian/rules;
  - uncommented previously missing build-dependencies in debian/control.
  - Re-enabled tests and uncommented build-dependencies accordingly.
* Removed libmodule-build-perl and libtest-harness-perl from
  Build-Depends-Indep (provided by perl-modules).
* Better cleaning of empty directories using find -type d -empty -delete
  instead of rmdir in debian/rules (LP: #324001).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package Bio::Graphics::Glyph::crossbox;
2
 
 
3
 
use strict;
4
 
use base qw(Bio::Graphics::Glyph::generic);
5
 
 
6
 
# override draw_component to draw a crossed box rather than empty
7
 
sub draw_component {
8
 
  my $self = shift;
9
 
  my $gd = shift;
10
 
  my $fg = $self->fgcolor;
11
 
  my ($left,$top) = @_;
12
 
  my($x1,$y1,$x2,$y2) = $self->bounds(@_);
13
 
  $self->unfilled_box($gd,
14
 
                      $x1, $y1,
15
 
                      $x2, $y2);
16
 
 
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);
22
 
  }
23
 
 
24
 
  $gd->line($x1,$y1,$x2,$y2,$fg);
25
 
  $gd->line($x1,$y2,$x2,$y1,$fg);
26
 
}
27
 
 
28
 
 
29
 
1;
30
 
 
31
 
__END__
32
 
 
33
 
=head1 NAME
34
 
 
35
 
Bio::Graphics::Glyph::crossbox - The "crossbox" glyph
36
 
 
37
 
=head1 SYNOPSIS
38
 
 
39
 
  See L<Bio::Graphics::Panel> and L<Bio::Graphics::Glyph>.
40
 
 
41
 
=head1 DESCRIPTION
42
 
 
43
 
This is a box with an 'X' inside the glyph.
44
 
 
45
 
=head2 OPTIONS
46
 
 
47
 
The following options are standard among all Glyphs.  See
48
 
L<Bio::Graphics::Glyph> for a full explanation.
49
 
 
50
 
  Option      Description                      Default
51
 
  ------      -----------                      -------
52
 
 
53
 
  -fgcolor      Foreground color               black
54
 
 
55
 
  -outlinecolor Synonym for -fgcolor
56
 
 
57
 
  -bgcolor      Background color               turquoise
58
 
 
59
 
  -fillcolor    Synonym for -bgcolor
60
 
 
61
 
  -linewidth    Line width                     1
62
 
 
63
 
  -height       Height of glyph                10
64
 
 
65
 
  -font         Glyph font                     gdSmallFont
66
 
 
67
 
  -connector    Connector type                 0 (false)
68
 
 
69
 
  -connector_color
70
 
                Connector color                black
71
 
 
72
 
  -label        Whether to draw a label        0 (false)
73
 
 
74
 
  -description  Whether to draw a description  0 (false)
75
 
 
76
 
  -hilite       Highlight color                undef (no color)
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