Skip to content

Commit d121516

Browse files
author
Jon Vegard Venås
committed
Add a white background to .svg-files.
1 parent dcca64c commit d121516

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/utils_gen/export_utils.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ function export_svg(
7878
r"height=\".*?\"" => "height=\"$h\"",
7979
count = 3,
8080
)
81+
82+
# Add white background
83+
svg_str1, header = extract_svg(svg)
84+
svg =
85+
header *
86+
"""<rect x="$ox" y="$(sh - oy - h)" width="$w" height="$h" fill="white"/> """ *
87+
svg_str1 * "</svg>\n"
88+
8189
open(filename, "w") do io
8290
print(io, svg)
8391
end

0 commit comments

Comments
 (0)