|
TinyMaterialDesign
|
Axis-aligned pixel rectangle used for widget bounds and hit-testing. More...
#include <Bounds.h>
Public Member Functions | |
| Bounds ()=default | |
| Bounds (int32_t x, int32_t y, int32_t w, int32_t h) | |
| int32_t | right () const |
| int32_t | bottom () const |
| int32_t | centerX () const |
| int32_t | centerY () const |
| bool | contains (int32_t px, int32_t py) const |
| Bounds | inset (int32_t amount) const |
Returns a rect inset by amount on every side (negative to grow). | |
Public Attributes | |
| int32_t | x = 0 |
| int32_t | y = 0 |
| int32_t | w = 0 |
| int32_t | h = 0 |
Axis-aligned pixel rectangle used for widget bounds and hit-testing.
Deliberately signed (unlike TinyGPU's size_t-based drawing calls) so widget layout math (x - radius, centering, ...) can't silently underflow; clamp to >=0 only at the point of calling into ISurface.
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns a rect inset by amount on every side (negative to grow).
|
inline |
| int32_t h = 0 |
| int32_t w = 0 |
| int32_t x = 0 |
| int32_t y = 0 |