在来自 `<image>` 或 `<use>` 元素的 SVG 文件中应用转换

问题描述 投票:0回答:0

所以基本上我想转换这个:

transform="翻译(...)"

到 x/y 坐标。在

<image>
元素


附加信息:

与这个问题类似但更具体: 移除 SVG 文件中的变换

我的问题专门针对

<image>
元素。

我有一个像这样的 svg 元素:

<image width="42" height="55" id="Piz_Buin" xlink:href="assets/svgs/pin.svg"  
    transform="matrix(1.0909 0 0 1.0909 32.8309 269.65)">
</image>

我希望输出是这样的:

<image width="42" height="55" id="Piz_Buin" xlink:href="assets/svgs/pin.svg"  x="10" y="832">
</image>

所以基本上我想转换这个: 转换=“矩阵(1.0909 0 0 1.0909 32.8309 269.65)” 到 x/y 坐标。在一个元素上

我如何做到这一点?

我尝试过但没有奏效的事情:

  • 使用 Inkscape 移动元素 -> 导出为转换
  • 使用 Inkscape“Apply Transforms”插件 -> 不支持
    <image>
    元素
  • 使用 Adobe Illustrator 移动元素 -> 导出为转换
  • 使用 Affinity Designer -> 甚至不支持从 svgs
     创建
    <image>
  • 元素
  • 尝试使用
    <use>
    元素代替,但问题与上述相同

我看过 svggo github 项目,它有 convertTransform 命令,但在阅读 API 后,似乎这个命令根本没有帮助。

svg graphics inkscape
© www.soinside.com 2019 - 2024. All rights reserved.