SDOM - Simple SDL Document Object Model
A lightweight, extensible Document Object Model for SDL-based applications.
|
Represents a rectangle's position and size in 2D space. More...
#include <SDOM.hpp>
Public Member Functions | |
float | width () const |
Calculates the width of the bounds. | |
float | height () const |
Calculates the height of the bounds. | |
bool | operator== (const Bounds &other) const |
bool | operator!= (const Bounds &other) const |
Public Attributes | |
float | left = 0.0f |
Left edge coordinate. | |
float | top = 0.0f |
Top edge coordinate. | |
float | right = 0.0f |
Right edge coordinate. | |
float | bottom = 0.0f |
Bottom edge coordinate. | |
Represents a rectangle's position and size in 2D space.
Stores the coordinates of the left, top, right, and bottom edges. Provides utility methods for calculating width and height. Useful for layout, collision, and rendering calculations.
|
inline |
Calculates the height of the bounds.
|
inline |
|
inline |
|
inline |
Calculates the width of the bounds.
SDOM::Bounds::bottom = 0.0f |
Bottom edge coordinate.
Bottom edge coordinate.
SDOM::Bounds::left = 0.0f |
Left edge coordinate.
Left edge coordinate.
SDOM::Bounds::right = 0.0f |
Right edge coordinate.
Right edge coordinate.
SDOM::Bounds::top = 0.0f |
Top edge coordinate.
Top edge coordinate.