Brace
brace()
Draw a curly brace between two points.
cetz.decorations.brace((0,1),(2,1))
cetz.decorations.brace((0,0),(2,0),
pointiness: 45deg, outer-pointiness: 45deg)
cetz.decorations.brace((0,-1),(2,-1),
pointiness: 90deg, outer-pointiness: 90deg)
start:
Start point
end:
End point
Styling
Root: brace
How pointy the spike should be. 0deg
or 100%
for maximum pointiness, 90deg
or 0%
for minimum.
How pointy the outer edges should be. 0deg
or 100%
for maximum pointiness (allowing for a smooth transition to a straight line), 90deg
or 0%
for minimum. Setting this to auto will use the value set for pointiness
.
Anchors
- start Where the brace starts, same as the
start
parameter. - end Where the brace end, same as the
end
parameter. - spike Point of the spike, halfway between
start
andend
and shifted byamplitude
towards the pointing direction. - content Point to place content/text at, in front of the spike.
- center Center of the enclosing rectangle.