[Bio] / FigKernelPackages / raedraw.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/raedraw.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11, Mon Dec 5 19:06:30 2005 UTC revision 1.12, Tue Jun 6 00:58:23 2006 UTC
# Line 95  Line 95 
95    if (defined $args{"-".$arg}) {$self->{$arg}=$args{"-".$arg}} else {$self->{$arg}=$args{"-".$arg}=1}    if (defined $args{"-".$arg}) {$self->{$arg}=$args{"-".$arg}} else {$self->{$arg}=$args{"-".$arg}=1}
96   }   }
97    
98     return $self unless (defined $args{'-compare_to'});
99    
100   foreach my $arr ($args{"-scalefactor"}) {   foreach my $arr ($args{"-scalefactor"}) {
101    $self->{'scale'}->{$arr->[0]}=$arr->[1];    $self->{'scale'}->{$arr->[0]}=$arr->[1];
102   }   }
# Line 638  Line 640 
640      return hsb2rgb( $hue, $sat, $br );      return hsb2rgb( $hue, $sat, $br );
641  }  }
642    
643    
644    sub heat_map_color {
645        my ($self, $fraction, $color)=@_;
646        my $hue=$fraction/100;
647        my @color=hsb2rgb($hue, 0.6, 1);# saturation and brightness are fixed at 100%
648        if ($color eq 'blue') {($color[2], $color[0])=($color[0], $color[2])}
649        elsif ($color eq 'green') {($color[1], $color[0])=($color[0], $color[1])}
650        return @color;
651    }
652    
653    
654    
655  #  #
656  #  Convert HSB to RGB.  Hue is taken to be in range 0 - 1 (red to red);  #  Convert HSB to RGB.  Hue is taken to be in range 0 - 1 (red to red);
657  #  #

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3