Skip to main content

merge-path

merge-path() 

Merges two or more paths by concatenating their elements. Anchors and visual styling, such as stroke and fill, are not preserved. When an element’s path does not start at the same position the previous element’s path ended, a straight line is drawn between them so that the final path is continuous. You must then pay attention to the direction in which element paths are drawn.

Elements hidden via hide are ignored.

Anchors

centroid
Centroid of the closed and non self-intersecting shape. Only exists if close is true. Supports path anchors and shapes where all vertices share the same z-value.
merge-path(fill: white, {
line((0, 0), (1, 0))
bezier((), (0, 0), (1,1), (0,1))
})

Elements with paths to be merged together.

join:

Connect all sub-paths with a straight line

close:

Close the path with a straight line from the start of the path to its end.

ignore-marks:

If true, remove marks from input elements

ignore-hidden:

If true, ignore all hidden elements

name:

none or str

..style: