28#include <utility/graphic/color.hpp>
30#include "guillaume/ecs/component.hpp"
77 utility::graphic::Color32Bit _color;
184 utility::graphic::Color32Bit
getColor(
void)
const;
Corner radii and outline stroke of a rectangular entity.
Borders & setWidth(float width)
Set the width of the stroke painted by systems::RectangleRender.
Borders & setTopLeftRadius(BorderRadius radius)
Set the radius of the top-left corner.
BorderRadius getBottomLeftRadius(void) const
Get the radius of the bottom-left corner.
float BorderRadius
A corner radius, in dp.
bool operator!=(const Borders &other) const
Opposite of operator==.
Borders & setBottomLeftRadius(BorderRadius radius)
Set the radius of the bottom-left corner.
float getWidth(void) const
Get the width of the stroke.
Borders & setBorderRadius(BorderRadius radius)
Set the same radius on the four corners.
Borders & setTopRightRadius(BorderRadius radius)
Set the radius of the top-right corner.
bool operator==(const Borders &other) const
Compare the four radii, the stroke color and the stroke width. The changed flag is not compared.
BorderRadius getBottomRightRadius(void) const
Get the radius of the bottom-right corner.
Borders & setColor(const utility::graphic::Color32Bit &color)
Set the color of the stroke.
BorderRadius getTopLeftRadius(void) const
Get the radius of the top-left corner.
Borders & setBottomRightRadius(BorderRadius radius)
Set the radius of the bottom-right corner.
Borders(void)
Construct square corners with no stroke: every radius 0, a transparent color and a width of 0.
utility::graphic::Color32Bit getColor(void) const
Get the color of the stroke.
~Borders(void)=default
Default destructor for the Borders component.
bool operator<(const Borders &other) const
Order borders so they can be used as a key in an ordered container.
bool hasStroke(void) const
Check whether a visible stroke must be painted.
BorderRadius getTopRightRadius(void) const
Get the radius of the top-right corner.
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.
std::ostream & operator<<(std::ostream &stream, const Borders &borders)
Print the four corner radii, for logs and test failures.