Counts geometry before allocation without allowing accumulated costs to exceed the allowance.
More...
#include "donner/svg/renderer/DecorationWorkBudget.h"
|
| | DecorationWorkBudget (Count allowance) |
| | Creates a preflight with the draw's remaining allowance.
|
| void | add (Count points) |
| | Charges one segment, permanently exhausting the allowance if it cannot fit.
|
|
bool | exceeded () const |
| | Whether any segment exceeded the allowance.
|
|
Count | remaining () const |
| | Work left after all admitted segments, or zero after rejection.
|
|
Count | points () const |
| | Number of points admitted, valid for geometry construction only when not exceeded.
|
template<std::unsigned_integral Count>
class donner::svg::detail::DecorationWorkBudget< Count >
Counts geometry before allocation without allowing accumulated costs to exceed the allowance.
- Template Parameters
-
| Count | Unsigned work-counter type. |
◆ DecorationWorkBudget()
template<std::unsigned_integral Count>
Creates a preflight with the draw's remaining allowance.
- Parameters
-
| allowance | Maximum geometry work admitted by this preflight. |
◆ add()
template<std::unsigned_integral Count>
Charges one segment, permanently exhausting the allowance if it cannot fit.
- Parameters
-
| points | Number of points the segment would generate. |
The documentation for this class was generated from the following file: