Improve rendered SVG output syntax for better compatibility and terseness (#1880)

* Improve rendered SVG output syntax for better compatibility and terseness

* Fix CI failing on boolean operations without wasm32?

* Attempt 2
This commit is contained in:
Keavon Chambers
2024-07-30 08:28:49 -07:00
committed by GitHub
parent 22ebe9a2cb
commit 44ffb635e9
12 changed files with 249 additions and 189 deletions

View File

@@ -93,7 +93,10 @@ fn render_svg(data: impl GraphicElementRendered, mut render: SvgRender, render_p
attributes.push("y", "0");
attributes.push("width", footprint.resolution.x.to_string());
attributes.push("height", footprint.resolution.y.to_string());
attributes.push("transform", format_transform_matrix(footprint.transform.inverse()));
let matrix = format_transform_matrix(footprint.transform.inverse());
if !matrix.is_empty() {
attributes.push("transform", matrix);
}
attributes.push("fill", "white");
});
}