Skip to main content

rect-around

rect-around() 

Draws an axis aligned bounding box around all given coordinates and/or elements. Everything else (styling, anchors) is similar to rect.

Bounds of elements are calculated by computing the bounding box of their paths, or as a fallback, using all anchors of the element.

Styling

The padding attribute can be used to control spacing. Other attributes are forwarded to the rect shape.

Anchors

The same as for the rect shape.

circle((1, 1), radius: 0.1, fill: blue, name: "c1")
circle((0, 1), radius: 0.1, fill: red, name: "c2")
rect((0, 2), (1, 2.5), name: "r1")
rect-around("c1", "c2", "r1", stroke: yellow, padding: 0.1)

..pts-style:

Positional two or more coordinates/elements to calculate bounding box of. Accepts style key-value pairs.

ignore-marks:

If true, ignore mark shapes when calculating a shape’s bounding box

ignore-hidden:

ignore-floating:

ignore-shapes:

Use only anchors for bounds calculation