|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
Marks an entity as a filled ellipse: a dot, a switch thumb, a disc. More...
#include <headers/guillaume/components/ellipse.hpp>


Public Types | |
| using | SegmentCount = int |
| A number of straight segments. | |
Public Member Functions | |
| Ellipse (void) | |
| Construct an ellipse drawn with 48 segments. | |
| ~Ellipse (void)=default | |
| Default destructor for the Ellipse component. | |
| SegmentCount | getSegments (void) const |
| Get how many straight segments approximate the outline. | |
| Ellipse & | setSegments (SegmentCount segments) |
| Set how many straight segments approximate the outline. | |
| Public Member Functions inherited from guillaume::ecs::Component | |
| bool | hasChanged (void) const |
| Tell whether a value of the component changed since the flags were last reset (the end of the previous frame). | |
| void | setHasChanged (bool hasChanged) |
| Raise or lower the changed flag. | |
| Component (void)=default | |
| Create a component that is not marked as changed. | |
| virtual | ~Component (void)=default |
| Virtual destructor, so components can be destroyed through the base class. | |
Marks an entity as a filled ellipse: a dot, a switch thumb, a disc.
The ellipse is the one inscribed in the entity's components::Bound (a square bound gives a circle) and is filled with the entity's components::Color. The only value held here is how many segments approximate the outline.
Added by the widget classes that need a round shape, or by the application. Read by systems::EllipseRender in the Render phase, with the entity's Transform, Bound and Color.
Definition at line 52 of file ellipse.hpp.
| using guillaume::components::Ellipse::SegmentCount = int |
A number of straight segments.
Definition at line 55 of file ellipse.hpp.
|
explicit |
Construct an ellipse drawn with 48 segments.
Definition at line 27 of file ellipse.cpp.


| Ellipse::SegmentCount guillaume::components::Ellipse::getSegments | ( | void | ) | const |
Get how many straight segments approximate the outline.
Definition at line 32 of file ellipse.cpp.
| Ellipse & guillaume::components::Ellipse::setSegments | ( | SegmentCount | segments | ) |
Set how many straight segments approximate the outline.
More segments give a smoother curve for more triangles. Always marks the component changed, even when the count is the same.
| segments | The segment count; a value below 1 is stored as 1. |
Definition at line 37 of file ellipse.cpp.
