我的问题的合并部分在这里得到了很好的回答:https ://stackoverflow.com/a/49051988/4272389它解决了两个LineGradients一个线节点和另一个路径节点。
在我的情况下,我有一个 Open Bezier 路径和一个 Line 路径,并且不确定 LineGradient 的答案是否仍然适用
<g class="com.sun.star.drawing.OpenBezierShape">
<g id="id5">
<rect class="BoundingBox" stroke="none" fill="none" x="7699" y="4699" width="303" height="203"/>
<path fill="none" stroke="rgb(52,101,164)" d="M 7700,4900 C 7816,4847 7964,4842 8000,4700"/>
</g>
</g>
<g class="com.sun.star.drawing.LineShape">
<g id="id6">
<rect class="BoundingBox" stroke="none" fill="none" x="8799" y="6099" width="30" height="3"/>
<path fill="none" stroke="rgb(52,101,164)" d="M 8800,6100 L 8827,6100"/>
</g>
</g>
使用先前答案中建议的视图框转换过程(https://svgwg.org/svg2-draft/coords.html#ComputingAViewportsTransform),合并是否需要扩展边界框,然后使用来自 id5 的原点,然后转换 id6 坐标进入我称之为“合并”的扩展框中的相对值?:我的算术表达式是伪代码,表示我的变换公式)
<g id="merged">
<rect class="BoundingBox" stroke="none" fill="none" x="8799" y="6099" width="300+(8799-7699)+30" height="203+(6100-4699)+3"/>
<path fill="none" stroke="rgb(52,101,164)" d="M 7700,4900 C 7816,4847 7964,4842 8000,4700 m [(8799-7699) + (8800-8799), (6099-4699) + (6100-6099)] l (8827-8799),(6100-6099)"/>
</g>
原因:片段是用 LibreOffice draw 绘制的,路径是用 Inkscape 连接的,但我不能完全这样做,所以我必须手动关闭最终 Inkscape 结果中的路径。