Skip to main content

merge-path

merge-path() 

Merges two or more paths by concattenating 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.

merge-path(fill: white, {
line((0, 0), (1, 0))
bezier((), (0, 0), (1,1), (0,1))
})

Elements hidden via @@hide() are ignored.

Elements with paths to be merged together.

close:

Default: false

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

Anchors

Supports path anchors.