You need to enable JavaScript to run this app. Inkscape 1.2.1命令行调用transform-grow/translate报错求助
优惠活动
大模型
产品
解决方案
定价
更多

Inkscape 1.2.1命令行调用transform-grow/translate报错求助

解决Inkscape 1.2.1命令行transform动作报错问题

核心原因

Inkscape 1.2+版本对命令行动作系统做了调整,旧版的transform-grow、transform-translate动作名称已被废弃,改用统一的object-transform动作配合具体参数实现变换功能。同时需注意命令中的引号必须使用英文双引号,中文引号会导致解析错误。

正确命令示例

1. 实现“放大(grow)”效果

使用scale参数指定缩放比例(x轴和y轴,示例为放大1.5倍):

inkscape --query-id=path1234 input.svg --actions="object-transform:scale(1.5,1.5)" --export-filename=output.svg

2. 实现“平移(translate)”效果

使用translate参数指定偏移量(x轴和y轴,示例为向右10px、向下20px):

inkscape --query-id=path1234 input.svg --actions="object-transform:translate(10,20)" --export-filename=output.svg

额外说明

  • 如果需要多次变换,可以用分号分隔多个动作,例如先平移再缩放:
    inkscape --query-id=path1234 input.svg --actions="object-transform:translate(10,20);object-transform:scale(1.5,1.5)" --export-filename=output.svg
    
  • --query-id参数已自动选中目标对象,无需额外添加选中动作。

内容的提问来源于stack exchange,提问作者Fred

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 04:15:40