25#include <utility/graphic/color.hpp>
27#include "guillaume/ecs/component.hpp"
28#include "guillaume/theme/tokens.hpp"
65 float _level { 1.0f };
67 float _spread { 0.0f };
68 utility::graphic::Color32Bit _color {
148 utility::graphic::Color32Bit
getColor(
void)
const;
Elevation & setLayers(int layers)
Set the number of shapes the shadow is made of.
~Elevation(void)=default
Default destructor for the Elevation component.
float getLevel(void) const
Get the factor applied to the spread.
float getSpread(void) const
Get how far the shadow reaches beyond the bound.
bool hasShadow(void) const
Check whether a visible shadow must be painted.
int getLayers(void) const
Get the number of shapes the shadow is made of.
Elevation & setElevationLevel(theme::ElevationLevel level)
Resolve the shadow from a Material 3 elevation level.
Elevation & setLevel(float level)
Set the factor applied to the spread.
Elevation & setSpread(float spread)
Set how far the shadow reaches beyond the bound.
utility::graphic::Color32Bit getColor(void) const
Get the shadow color.
Elevation & setColor(const utility::graphic::Color32Bit &color)
Set the shadow color.
theme::ElevationLevel getElevationLevel(void) const
Get the level last applied with setElevationLevel().
Elevation(void)
Construct an elevation resolved from the Level1 token of the active theme. The component starts uncha...
Base class of every component: a piece of state attached to an entity, plus a "changed" flag.
State. Every class here is plain data attached to an entity.
ElevationLevel
How far a surface is raised above the background, in six steps.
@ Level1
Lowest raised level.