Hi,

I have a strange error in my script. It should
paint a column of lines next to each other in
colors which are determinated by a given sequence 
of letters. It works...but only to the position
of 251. After this point all lines have the color
of the line at position 251...even when I use
a different letter sequence.

Is this a sign? The 251?  ;) Nope, any hints?

Here is the basic sheme. I hope I did't kill 
an impotant detail.


my $seq       = $_[0];
my @seq_s     = split ('',$seq);

my $length    = length $seq;

$pic_length = $length +100; 

my $img      = new GD::Image($pic_length,30);

for (my $pos = '0'; $pos < ($length-1); ++$pos)
    {
     my $aa = $seq_s[$pos];

     my $color;     

    if     ($aa eq 'A')
           {$color = $img->colorAllocate(255,0,0);}
    elsif  ($aa eq 'B')
           {$color = $img->colorAllocate(255,0,0);} 
    elsif  ($aa eq 'C')
           {$color = $img->colorAllocate(0,0,255);} 
    elsif  ($aa eq 'D')
           {$color = $img->colorAllocate(0,0,255);} 
    
     $img->line($pos,1,$pos,21,$color);
    }

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to