|
Ersa Wearable Platform
Embedded smartwatch firmware and application framework
|
#include <types.h>
Public Member Functions | |
| constexpr | Rect ()=default |
| constexpr | Rect (int16_t rx, int16_t ry, int16_t rw, int16_t rh) |
| constexpr bool | isEmpty () const |
| constexpr bool | contains (int16_t px, int16_t py) const |
Public Attributes | |
| int16_t | x {0} |
| int16_t | y {0} |
| int16_t | w {0} |
| int16_t | h {0} |
Half-open axis-aligned rectangle used for layout and partial refresh regions. Left/top are included and right/bottom are excluded; this convention matches framebuffer indexing and allows adjacent regions to share an edge safely.
|
constexprdefault |
Construct an empty rectangle at the origin.
|
inlineconstexpr |
Construct a rectangle with origin and width/height extents.
|
inlineconstexpr |
Test point containment using the half-open edge convention.
|
inlineconstexpr |
Return true if either extent is zero or negative.
| int16_t ersa::Rect::h {0} |
Vertical extent; non-positive values make the rectangle empty.
| int16_t ersa::Rect::w {0} |
Horizontal extent; non-positive values make the rectangle empty.
| int16_t ersa::Rect::x {0} |
Inclusive left edge in logical pixels.
| int16_t ersa::Rect::y {0} |
Inclusive top edge in logical pixels.