class RatatuiRuby::Layout::Rect

Defines a rectangular area in the terminal grid.

Geometry management involves passing groups of four integers (‘x, y, width, height`) repeatedly. This is verbose and prone to parameter mismatch errors.

This class encapsulates the geometry. It provides a standard primitive for passing area definitions between layout engines and rendering functions.

Use it when manual positioning is required or when querying layout results.

Examples

area = Layout::Rect.new(x: 0, y: 0, width: 80, height: 24)
puts area.width # => 80