A rectangular region of the terminal, in cell coordinates.
The origin {0, 0} is the top-left cell. Rects are used both to describe a
viewport (the whole terminal) and to place a view inside it.
Summary
Functions
Centres a width x height rect inside outer.
The rect inset by n cells on every side (a border's interior).
Builds a rect, clamping the size to zero or more.
A rect at the origin with the given size.
The same rect moved to the origin — what a view sees when it renders.
Types
@type t() :: %Atui.Rect{ height: non_neg_integer(), width: non_neg_integer(), x: integer(), y: integer() }
Functions
Centres a width x height rect inside outer.
The size is clamped to outer, so a popup larger than the terminal simply
fills it instead of spilling over the edges.
The rect inset by n cells on every side (a border's interior).
Builds a rect, clamping the size to zero or more.
A rect at the origin with the given size.
The same rect moved to the origin — what a view sees when it renders.