mirror of
https://github.com/ratatui/ratatui.git
synced 2025-09-28 05:21:23 +00:00

This change fixes the unexpected behavior of the Rect::new() function to be more intuitive. The Rect::new() function now clamps the width and height of the rectangle to keep each bound within u16::MAX. The Rect::area() function now returns a u32 instead of a u16 to allow for larger areas to be calculated. Previously, the Rect::new() function would clamp the total area of the rectangle to u16::MAX, by preserving the aspect ratio of the rectangle. BREAKING CHANGE: Rect::area() now returns a u32 instead of a u16. Fixes: <https://github.com/ratatui/ratatui/issues/1375> Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>