This glyph was designed to show an inverted "L" representing splice
donors and acceptors. The vertical part of the L points downwards and
is positioned in the center of the range (even if the range is quite
large).
In addition to the usual glyph options, this glyph recognizes:
Option Value Description
------ ----- -----------
direction "left" or "right" direction the short part of the L
points
height_fraction 0.0 - 1.0 fractional height of the glyph,
usually a callback that uses the
feature's score to determine its
height
None available.
sub draw_component
{ my $self = shift;
my $gd = shift;
my ($left,$top) = @_;
my($x1,$y1,$x2,$y2) = $self->bounds(@_);
my $center = int(0.5+($x1+$x2)/2); my $direction = $self->option('direction');
my $height = $y2 - $y1;
my $fraction = $self->option('height_fraction') || 1.0;
my $bottom = $y2;
$top = $y2 - $fraction * $height;
my $fgcolor = $self->fgcolor;
$gd->line($center,$bottom,$center,$top,$fgcolor);
if ($direction eq 'right') {
$gd->line($center,$top,$center + PWIDTH,$top,$fgcolor);
} elsif ($direction eq 'left') {
$gd->line($center,$top,$center - PWIDTH,$top,$fgcolor);
}
}
1; } |
Please report them.