24#include <utility/graphic/color.hpp>
25#include <utility/graphic/pose.hpp>
27#include "guillaume/ecs/component.hpp"
67 enum class Variant { FullWidth, Inset, Middle };
154 const utility::graphic::Color32Bit &
getColor(
void)
const;
215 Variant _variant { Variant::FullWidth };
216 float _length { 100.0f };
218 float _inset { 16.0f };
219 utility::graphic::Color32Bit _color {};
220 utility::graphic::PoseF _originPose {};
221 utility::graphic::PoseF _appliedPose {};
Divider & setInset(float inset)
Set the inset applied to an inset end.
Variant
Which ends of the divider are inset.
static constexpr float BoldThickness
Thickness of a bold stroke, in dp.
float getLength(void) const
Get the total length, insets included.
const utility::graphic::PoseF & getOriginPose(void) const
Get the pose of the divider before the leading inset.
Divider & setVariant(Variant variant)
Choose which ends are inset.
~Divider(void)=default
Default destructor.
Divider & setColor(const utility::graphic::Color32Bit &color)
Set the stroke color.
const utility::graphic::Color32Bit & getColor(void) const
Get the stroke color.
Divider & setOriginPose(const utility::graphic::PoseF &pose)
Set the pose of the divider before the leading inset.
Divider & setThickness(float thickness)
Set the stroke thickness.
float getInset(void) const
Get the inset applied to an inset end.
Divider(void)=default
Create the state of a full-width hairline divider, 100 dp long.
float getTrailingInset(void) const
Get the inset applied on the trailing (right) end for the current variant.
Divider & setAppliedPose(const utility::graphic::PoseF &pose)
Record the pose written to the Transform.
float getLeadingInset(void) const
Get the inset applied on the leading (left) end for the current variant.
const utility::graphic::PoseF & getAppliedPose(void) const
Get the pose systems::Divider last wrote to the Transform.
Variant getVariant(void) const
Get which ends are inset.
float getThickness(void) const
Get the stroke thickness.
Divider & setLength(float length)
Set the total length, insets included.
static constexpr float HairlineThickness
Default stroke thickness, in dp.
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.