How to define custom element in cetz?

Add a anchor("default", (0,0)) after the set-origin to set the groups default anchor to that point – that should fix the groups anchor alignment/positioning.

1 Like