删除SVG文件中的转换 [英] Removing transforms in SVG files
问题描述
我已经为此苦苦挣扎了一段时间,似乎无法在任何地方找到答案(行之有效).我有一个看起来像这样的SVG文件:
I have been struggling with this for a while, and can't seem to find an answer (that works) anywhere. I have an SVG file which looks like this:
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
...
width="72.9375"
height="58.21875"
...>
...
<g
...
transform="translate(10.75,-308.96875)"
style="...">
<path
inkscape:connector-curvature="0"
d="m -10.254587,345.43597 c 0,-1.41732 0.17692,-2.85384 0.5312502,-3.5625 0.70866,-1.41733 2.14518,-2.82259 3.5625,-3.53125 1.41733,-0.70866 2.11392,-0.70867 3.53125,0 1.41732,0.70866 ... z"
... />
</g>
</svg>
我想删除transform="..."
行,但图像仍停留在放置它的位置(在InkScape中).如果我手动删除该转换,则图像会压缩到屏幕的另一部分(如预期的那样),但是我需要完全摆脱该转换,同时将图像精确地放置在所需的位置.有没有办法删除/展平到路径坐标本身的变换? (我需要处理的唯一变换是平移和缩放,没有矩阵.)
I want to remove the transform="..."
line but still have my image stay where I've placed it (in InkScape). If I manually remove the transform, the image zips to another part of the screen (as expected), but I need to get rid of the transform altogether and, at the same time, have the image stay exactly where I want it. Is there a way to remove/flatten the transforms into the path coordinates themselves? (The only transforms I have to deal with are translate and scale, no matrices.)
推荐答案
如何在Inkscape中删除转换
How to remove transforms in Inkscape
- 在Inkscape中打开svg文件
- 转到编辑"->"XML编辑器"
- 在图层中查找转换"属性并将其删除
如何在不创建其他变换属性的情况下完全移动所有对象
- 转到编辑"->在所有层中全选"
-
转到对象->变换
- Go to Edit -> Select All in All Layers
Go to Object -> Transform
在转换"面板中
取消选中相对移动,然后选中分别应用于每个对象
这篇关于删除SVG文件中的转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!