Show
Ignore:
Timestamp:
12.01.2012 15:52:20 (8 years ago)
Author:
davidb
Message:

More careful recursive traversal to classifier nodes; further developed of CSS to Expeditee attributes (background colour); and slightly less cludgy way to deal with full img URLS

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs3-extensions/html-to-expeditee/trunk/src/perllib/CssStyleToExpAttr.pm

    r24941 r24944  
    357357    return $exp_font_size; 
    358358} 
     359 
     360 
     361sub convert_color 
     362{ 
     363    my ($css_color) = @_; 
     364 
     365    my $exp_color; 
     366 
     367    if ($css_color =~ m/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/) { 
     368 
     369    my $r = int(100*$1/255); 
     370    my $g = int(100*$2/255); 
     371    my $b = int(100*$3/255); 
     372 
     373    print STDERR "*** r = $r, g = $g, b = $b\n"; 
     374 
     375    $exp_color = "$r $g $b"; 
     376 
     377    print STDERR "*** exp color = $exp_color\n"; 
     378 
     379    } 
     380    elsif ($css_color =~ m/^transparent/i) { 
     381    $exp_color = undef; 
     382    } 
     383 
     384    return $exp_color; 
     385} 
    359386     
    3603871;