我在一个
你是否考虑过将vector-effect属性设置为non-scaling-stroke?
<line vector-effect="non-scaling-stroke" stroke="black" stroke-width="5"
x1="32" y1="50" x2="32" y2="350"/>
http://www.w3.org/TR/SVGTiny12/painting.html#NonScalingStroke
更新:
我能想到的最好解决方案是手动转换路径的坐标。
vector-effect="non-scaling-vector"
的支持不够稳定。我的 Firefox 和 Safari 浏览器版本不支持,但 Chrome 浏览器支持。在这种情况下,我能想到的最好解决方案是手动计算路径的坐标 - 假设 SVG 没有 transform 元素,则坐标已经被转换了。