【发布时间】:2021-05-29 13:23:45
【问题描述】:
我的问题的合并部分在这里得到了很好的回答: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 结果中的路径。
【问题讨论】:
标签: svg inkscape libreoffice-draw