]> git.donarmstrong.com Git - biopieces.git/blobdiff - code_perl/Maasha/KISS/Draw.pm
www relayout
[biopieces.git] / code_perl / Maasha / KISS / Draw.pm
index 6a8bc52d977eb581b1d44b7e9692604176019b19..e9ae40e5f167995e29079d080644aa8a8f799798 100644 (file)
@@ -57,7 +57,7 @@ sub draw_feature
 
     foreach $feature ( @{ $features } )
     {
-        $cr->set_source_rgb( color_name2rgb( $feature->{ 'color' } ) );
+        $cr->set_source_rgb( @{ $feature->{ 'color' } } );
 
         if ( $feature->{ 'type' } eq 'line' )
         {
@@ -88,30 +88,6 @@ sub draw_feature
 }
 
 
-sub color_name2rgb
-{
-    my ( $color_name
-       ) = @_;
-
-    my ( %color_hash, $rgb );
-
-    %color_hash = (
-        'black' => [   0,   0,   0 ],
-        'red'   => [ 255,   0,   0 ],
-        'green' => [   0, 255,   0 ],
-        'blue'  => [   0,   0, 255 ],
-    );
-
-    if ( exists $color_hash{ $color_name } ) {
-        $rgb = $color_hash{ $color_name };
-    } else {
-        $rgb = [ 0, 0, 0 ];
-    }
-
-    return wantarray ? @{ $rgb } : $rgb;
-}
-
-
 sub file_png
 {
     # Martin A. Hansen, October 2009.