|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
A full ring: the outline of a radio button, the track of a circular progress indicator. More...
#include <headers/guillaume/components/ring.hpp>


Public Types | |
| using | SegmentCount = int |
| A number of straight segments. | |
Public Member Functions | |
| Ring (void) | |
| Construct a ring 8 dp thick drawn with 48 segments. | |
| ~Ring (void)=default | |
| Default destructor for the Ring component. | |
| float | getThickness (void) const |
| Get the thickness of the ring. | |
| Ring & | setThickness (float thickness) |
| Set the thickness of the ring. | |
| SegmentCount | getSegments (void) const |
| Get how many straight segments approximate the ring. | |
| Ring & | setSegments (SegmentCount segments) |
| Set how many straight segments approximate the ring. | |
| 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. | |
A full ring: the outline of a radio button, the track of a circular progress indicator.
The outer edge of the ring is the ellipse inscribed in the entity's components::Bound; the inner edge is thickness closer to the center. A square bound gives a circle.
Written by the widget systems that draw a ring, or by the application. Read by systems::RingRender in the Render phase, with the entity's Transform, Bound and Color (the color of the ring).
| using guillaume::components::Ring::SegmentCount = int |
|
explicit |
| Ring::SegmentCount guillaume::components::Ring::getSegments | ( | void | ) | const |
| float guillaume::components::Ring::getThickness | ( | void | ) | const |
| Ring & guillaume::components::Ring::setSegments | ( | SegmentCount | segments | ) |
Set how many straight segments approximate the ring.
More segments give a smoother curve for more triangles. Marks the component changed only when the value differs.
| segments | The segment count around the ring; systems::RingRender draws at least 1. |
Definition at line 53 of file ring.cpp.

| Ring & guillaume::components::Ring::setThickness | ( | float | thickness | ) |
Set the thickness of the ring.
Marks the component changed only when the value differs.
| thickness | The distance between the outer and inner edges, in dp, measured towards the center of the bound. |
Definition at line 38 of file ring.cpp.
