<commit_before>=head1 NAME

Bio::EnsEMBL::Glyph::Symbol::box

=head1 DESCRIPTION

A collection of drawing-code glyphs to represent a box.

=cut

package Bio::EnsEMBL::Glyph::Symbol::box;
use strict;
use Sanger::Graphics::Glyph::Rect;

use vars qw(@ISA);
use Bio::EnsEMBL::Glyph::Symbol;
@ISA = qw(Bio::EnsEMBL::Glyph::Symbol);

sub draw {
    my $self = shift;
    my $style = $self->style;
    my $feature = $self->feature;

    my $rowheight = $feature->{'row_height'};
    my $start = $feature->{'start'};
    my $end = $feature->{'end'};
    my $pix_per_bp = $feature->{'pix_per_bp'};
    my $y_offset = $feature->{'y_offset'};
   
    my $linecolour = $style->{'fgcolor'};
    my $fillcolour = $style->{'bgcolor'} || $style->{'colour'};
    $linecolour ||= $fillcolour;

    my $height = $style->{'height'};

    return new Sanger::Graphics::Glyph::Rect({
    	'x'          => $start-1,
	'y'          => $y_offset,
	'width'      => $end-$start+1,
	'height'     => $height,
	'colour'     => $fillcolour,
	'bordercolour' => $linecolour,
	'absolutey' => 1,
	(exists($style->{pattern}) ? (pattern=>$style->{pattern}) : ()),
    });
}

1;<commit_msg>patterncolour support rmp<commit_after>=head1 NAME

Bio::EnsEMBL::Glyph::Symbol::box

=head1 DESCRIPTION

A collection of drawing-code glyphs to represent a box.

=cut

package Bio::EnsEMBL::Glyph::Symbol::box;
use strict;
use Sanger::Graphics::Glyph::Rect;

use vars qw(@ISA);
use Bio::EnsEMBL::Glyph::Symbol;
@ISA = qw(Bio::EnsEMBL::Glyph::Symbol);

sub draw {
    my $self       = shift;
    my $style      = $self->style;
    my $featur e   = $self->feature;

    my $rowheight  = $feature->{'row_height'};
    my $start      = $feature->{'start'};
    my $end        = $feature->{'end'};
    my $pix_per_bp = $feature->{'pix_per_bp'};
    my $y_offset   = $feature->{'y_offset'};
   
    my $linecolour = $style->{'fgcolor'};
    my $fillcolour = $style->{'bgcolor'} || $style->{'colour'};
    $linecolour  ||= $fillcolour;

    my $height     = $style->{'height'};

    return new Sanger::Graphics::Glyph::Rect({
    	'x'             => $start-1,
	'y'             => $y_offset,
	'width'         => $end-$start+1,
	'height'        => $height,
	'colour'        => $fillcolour,
	'bordercolour'  => $linecolour,
	'absolutey'     => 1,
	'patterncolour' => $linecolour,
 	(exists($style->{pattern}) ? (pattern=>$style->{pattern}) : ()),
    });
}

1;
{'fraction_non_alphanumeric': 0.20833333333333334, 'fraction_numerical': 0.005, 'mean_word_length': 3.3813868613138687, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 46, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2351870', 'n_tokens_mistral': 947, 'n_tokens_neox': 889, 'n_words': 176}