summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e503c5e)
Fill area between current unit count and unit cap (same color as units
line, but transparant).
my $line = $lines[$_][$player];
my $start;
my $lasty;
my $line = $lines[$_][$player];
my $start;
my $lasty;
my @norm = ((map {$area{fieldysize} / $_} @max), $area{fieldxsize} / $maxtime);
my $xsteps = 25;
my @norm = ((map {$area{fieldysize} / $_} @max), $area{fieldxsize} / $maxtime);
my $xsteps = 25;
open my $output, '>', "$filename.svg";
$svg->process('timeline', {
title => "$title timeline for /replay/20080201md4x4",
open my $output, '>', "$filename.svg";
$svg->process('timeline', {
title => "$title timeline for /replay/20080201md4x4",
+ fill => $line == 2 && [
+ map { "\n\tM " . join "\tL ", map sprintf("%s %s\n",
+ $area{fieldxmin} + $_->[0] * $norm[4],
+ $area{fieldymax} - $_->[1] * $norm[$line+1]
+ ), grep defined, @{$lines[$line][$_]}, reverse @{$lines[$line+1][$_]} } 0 .. $#{$lines[$line]}
+ ],
paths => [
map { "\n\tM " . join "\tL ", map sprintf("%s %s\n",
$area{fieldxmin} + $_->[0] * $norm[4],
paths => [
map { "\n\tM " . join "\tL ", map sprintf("%s %s\n",
$area{fieldxmin} + $_->[0] * $norm[4],
+[% IF fill %]
+<g class="data">
+[% count = 0 %]
+[% FOREACH path = fill %][% count = count + 1 %]
+<path d="[% path %]" class="fill[% count %]" />
+[% END %]
+</g>
+[% END %]
+