diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2011-10-06 17:24:21 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2011-10-06 19:13:42 +0400 |
commit | 5daaf454b1c60f4ccf7d9f760e798156cdf09d7d (patch) | |
tree | 026411abae1f7d1e45407e8c2188ffa3cbc0b1c5 /lib/Slic3r/SVG.pm | |
parent | 33d7b8c7cfdc68f05a509b92b4f7c2a15154510a (diff) |
Faster algorithm for rectilinear fill
Diffstat (limited to 'lib/Slic3r/SVG.pm')
-rw-r--r-- | lib/Slic3r/SVG.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Slic3r/SVG.pm b/lib/Slic3r/SVG.pm index 6ce81efaa..0cc53ca2f 100644 --- a/lib/Slic3r/SVG.pm +++ b/lib/Slic3r/SVG.pm @@ -22,14 +22,14 @@ sub output { my $svg = svg($print); - foreach my $type (qw(polygons polylines)) { + foreach my $type (qw(polygons polylines white_polygons red_polylines)) { if ($things{$type}) { - my $method = $type eq 'polygons' ? 'polygon' : 'polyline'; + my $method = $type =~ /polygons/ ? 'polygon' : 'polyline'; my $g = $svg->group( style => { 'stroke-width' => 2, - 'stroke' => 'black', - 'fill' => 'none', + 'stroke' => $type =~ /red_/ ? 'red' : 'black', + 'fill' => $type eq 'polygons' ? 'grey' : 'none', }, ); foreach my $polygon (@{$things{$type}}) { |