以编程方式合并两个svg路径元素 [英] Merge two svg path elements programmatically
问题描述
我正在使用,带有以下参数:
- buffer_distance = 0
- 其中=ISO ='re gion_1'OR ISO ='region_2'
其中 region_1
和 region_2
是您需要合并的两个区域。
通过这种方式解决问题也意味着生成的SVG路径对原始坐标是真的,而后续修复可能会导致一些(可能是次要的)不一致。
I am rendering a map out of SVG paths (using jVectormap).
There are cases where one region has to be merged with the neighboring region.
Unfortunately both regions don't touch each other and I have to interpolate to fill the space in between.
jVectormap uses very simple SVG paths with M
to set the the absolute startpoint and l
to connect relative points.
Does any of the SVG libraries cover such an operation?
I haven't tried this, but you may get around it by running the converter at jVectormap with the following parameters:
--buffer_distance=0
--where="ISO='region_1' OR ISO='region_2'"
Where region_1
and region_2
are the two regions that you need to merge.
Solving the problem this way also means that the generated SVG paths are true to the original coordinates, whereas a following fix may lead to some (probably minor) inconsistencies.
这篇关于以编程方式合并两个svg路径元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!