|
stmm-games-doc
0.32.0
|
Constraints to tile size and width to height ratio. More...
Public Member Functions | |
| bool | isValid () const noexcept |
| NSize | getBest (int32_t nReqW) const noexcept |
| Calculates the best tile size given a requested width. More... | |
Public Attributes | |
| int32_t | m_nMinW = 5 |
| Minimum width in pixels. More... | |
| int32_t | m_nMaxW = 1000 |
| Maximum width in pixels. More... | |
| int32_t | m_nMinH = 5 |
| Minimum height in pixels. More... | |
| int32_t | m_nMaxH = 1000 |
| Maximum height in pixels. More... | |
| double | m_fWHRatio = 1.0 |
| The fixed width to height ratio. More... | |
Constraints to tile size and width to height ratio.
|
noexcept |
Calculates the best tile size given a requested width.
The resulting size might not satisfy the constraints because they can't.
| nReqW | The requested width. |
|
noexcept |
| double stmg::TileSizing::m_fWHRatio = 1.0 |
The fixed width to height ratio.
Minimum is 0.001. Maximum is 1000.0. Default is 1.
| int32_t stmg::TileSizing::m_nMaxH = 1000 |
Maximum height in pixels.
Cannot be smaller than m_nMinH. Default is 1000.
| int32_t stmg::TileSizing::m_nMaxW = 1000 |
Maximum width in pixels.
Cannot be smaller than m_nMinW. Default is 1000.
| int32_t stmg::TileSizing::m_nMinH = 5 |
Minimum height in pixels.
Must be positive. Default is 5.
| int32_t stmg::TileSizing::m_nMinW = 5 |
Minimum width in pixels.
Must be positive. Default is 5.
1.8.13