termcol: support image for table palettes
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 8 Feb 2016 04:37:59 +0000 (05:37 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 22 Mar 2017 21:28:04 +0000 (22:28 +0100)
termcol.plp

index 850ff83e9ccaf98bc67aef81593b70f592d77088..7e408e602e28288dfa1bae3f54e8559dc237e38c 100644 (file)
@@ -134,6 +134,12 @@ for my $term (@termlist) {
                        print '<tr>';
                        print colcell(@$_) for @$row;
                }
                        print '<tr>';
                        print colcell(@$_) for @$row;
                }
+
+               my $width = scalar @{ $table->[0] };
+               my @imgpal = map { [ @{$_}[1 .. 3] ] } map { @{$_} } @{$table};
+               for (@draw) {
+                       print "<tr><td colspan=$width>", img_egapal(\@imgpal, @{$_});
+               }
                print "</table>\n\n";
        }
 
                print "</table>\n\n";
        }