Rect
#include <Geometry.hpp>Represents a rectangular region in 2D space.
Defines position (x, y) and size (width, height) of a rectangular area. Provides helper methods to calculate bounds.
Public Attributes
Section titled “Public Attributes”| Return | Name | Description |
|---|---|---|
int | x | X coordinate of top-left corner. |
int | y | Y coordinate of top-left corner. |
int | width | Width of rectangle. |
int | height | Height of rectangle. |
int x = 0X coordinate of top-left corner.
int y = 0Y coordinate of top-left corner.
int width = 0Width of rectangle.
height
Section titled “height”int height = 0Height of rectangle.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
int | right const inline | Returns the X coordinate of the right edge (exclusive). |
int | bottom const inline | Returns the Y coordinate of the bottom edge (exclusive). |
const inline
inline int right() constReturns the X coordinate of the right edge (exclusive).
Returns
Section titled “Returns”x + width
bottom
Section titled “bottom”const inline
inline int bottom() constReturns the Y coordinate of the bottom edge (exclusive).
Returns
Section titled “Returns”y + height