Skip to content

Commit

Permalink
Added render_width/height to svg.
Browse files Browse the repository at this point in the history
  • Loading branch information
aptmcl committed Nov 13, 2024
1 parent 5cf60fd commit f5521e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ fixing_svg(io::IO, svgpath) =
s = replace(s, "linearGradient id=\"linear" => "linearGradient id=\"linear-$(_tikzid)-")
s = replace(s, "#linear" => "#linear-$(_tikzid)-")
s = replace(s, "image id=\"" => "image style=\"image-rendering: pixelated;\" id=\"")
s = replace(s, r"width\s*=\s*\"[^\"]*\"" => "width=\"$(render_width())\"")
s = replace(s, r"height\s*=\s*\"[^\"]*\"" => "height=\"$(render_height())\"")
tikz_id(_tikzid + 1)
println(io, s)
end
Expand Down

0 comments on commit f5521e5

Please sign in to comment.