Skip to main content

anchor

anchor() 

Creates a new anchor for the current group. This element can only be used inside a group otherwise it will panic. The new anchor will be accessible from inside the group by using just the anchor's name as a coordinate.

// Create group
group(name: "g", {
circle((0,0))
anchor("x", (.4, .1))
circle("x", radius: .2)
})
circle("g.x", radius: .1)

The name of the anchor

The position of the anchor