25#include "guillaume/ecs/component.hpp"
78 float _margin { 0.0f };
79 bool _enabled {
true };
Clip & setEnabled(bool enabled)
Turn clipping on or off without removing the component.
float getMargin(void) const
Get the inset between the bound and the clip rectangle.
const Rect & getRect(void) const
Get the rectangle computed by systems::Clip.
bool isEnabled(void) const
Check whether systems::Clip processes this entity.
~Clip(void)=default
Default destructor for the Clip component.
Clip & setMargin(float margin)
Set the inset between the bound and the clip rectangle.
Clip & setRect(const Rect &rect)
Store the computed rectangle. Called by systems::Clip; a value set by hand is replaced on the next fr...
Clip(void)=default
Default constructor for the Clip component.
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.
The clip rectangle, in the same coordinates as the position of a components::Transform.
bool operator==(const Rect &other) const
Compare the origin and the size of two rectangles.
float height
Height, in dp.