Skip to content

Commit

Permalink
Merge pull request #24 from jkcclemens/viewBox
Browse files Browse the repository at this point in the history
feat: set a viewBox on svg renders
  • Loading branch information
kennytm authored Nov 9, 2018
2 parents cfa6793 + 291f5be commit 71e371d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/render/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl<'a> RenderCanvas for Canvas<'a> {
concat!(
r#"<?xml version="1.0" standalone="yes"?>"#,
r#"<svg xmlns="http://www.w3.org/2000/svg""#,
r#" version="1.1" width="{w}" height="{h}" shape-rendering="crispEdges">"#,
r#" version="1.1" viewBox="0 0 {w} {h}" shape-rendering="crispEdges">"#,
r#"<rect x="0" y="0" width="{w}" height="{h}" fill="{bg}"/>"#,
r#"<path fill="{fg}" d=""#,
),
Expand Down
2 changes: 1 addition & 1 deletion src/test_annex_i_micro_qr_as_svg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/test_annex_i_qr_as_svg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 71e371d

Please sign in to comment.