Skip to content

Commit ce08ce8

Browse files
update polygon and path draw functions
1 parent 426e73b commit ce08ce8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

plotters-svg/src/svg.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,9 @@ impl<'a> DrawingBackend for SVGBackend<'a> {
443443
.write_value(style.stroke_width());
444444
attrwriter
445445
.write_key("points")
446-
.write_value(FormatEscapedIter(path.into_iter().map(|c| (c.0, ',', c.1))));
446+
.write_value(FormatEscapedIter(
447+
path.into_iter().map(|c| (c.0, ',', c.1, ' ')),
448+
));
447449
attrwriter.close();
448450
Ok(())
449451
}
@@ -465,7 +467,9 @@ impl<'a> DrawingBackend for SVGBackend<'a> {
465467
.write_value(make_svg_color(style.color()));
466468
attrwriter
467469
.write_key("points")
468-
.write_value(FormatEscapedIter(path.into_iter()));
470+
.write_value(FormatEscapedIter(
471+
path.into_iter().map(|c| (c.0, ',', c.1, ' ')),
472+
));
469473
attrwriter.close();
470474

471475
Ok(())

0 commit comments

Comments
 (0)