|
TachyonUI 0.1.0
High-performance UI for building tools.
|
A size in CSS px. More...
#include <gui_core/gui_units.h>
Public Member Functions | |
| constexpr | CssPx ()=default |
| constexpr | CssPx (int32_t v) |
| Implicit, so a plain int size is CSS px. | |
| constexpr auto | operator<=> (const CssPx &) const =default |
Public Attributes | |
| int32_t | value = 0 |
A size in CSS px.
Sizes in the API are CSS px: the library scales them by the UI scale, as it does the stylesheet's. Positions, and sizes the library measured or computed, are whole device pixels; so is every int2 and IntRect (positions, rects, extents).
LayoutOverride{}.Width(200) // 200 CSS px: 300 pixels at 150%
LayoutOverride{}.Width(Pixels{ measured }) // as is
|
constexprdefault |
|
inlineconstexpr |
Implicit, so a plain int size is CSS px.
|
constexprdefault |
| int32_t tachyon::CssPx::value = 0 |