Skip to main content

compound-path

compound-path() 

Create a new path with each element used as sub-paths. This can be used to create paths with holes.

Unlike merge-path, this function groups the shapes as sub-paths instead of concattenating them into a single continous path.

compound-path({
rect((-1, -1), (1, 1))
circle((0, 0), radius: .5)
}, fill: blue, fill-rule: "even-odd")

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.

Elements with paths to be merged together.