|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
A portion of a ring: the moving part of a circular progress or loading indicator. More...
#include <headers/guillaume/components/arc.hpp>


Public Types | |
| using | SegmentCount = int |
| A number of straight segments. | |
Public Member Functions | |
| Arc (void) | |
| Construct a half circle: 8 dp thick, starting at angle 0, covering pi radians, drawn with 48 segments. | |
| ~Arc (void)=default | |
| Default destructor for the Arc component. | |
| float | getThickness (void) const |
| Get the thickness of the arc. | |
| Arc & | setThickness (float thickness) |
| Set the thickness of the arc. | |
| float | getStartAngle (void) const |
| Get the angle the arc starts at. | |
| Arc & | setStartAngle (float startAngle) |
| Set the angle the arc starts at. | |
| float | getSweepAngle (void) const |
| Get the angle the arc covers. | |
| Arc & | setSweepAngle (float sweepAngle) |
| Set the angle the arc covers from its start angle. | |
| SegmentCount | getSegments (void) const |
| Get how many straight segments approximate the arc. | |
| Arc & | setSegments (SegmentCount segments) |
| Set how many straight segments approximate the arc. | |
| 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 portion of a ring: the moving part of a circular progress or loading indicator.
The outer edge of the arc is the ellipse inscribed in the entity's components::Bound; the arc is thickness wide towards the center, starts at startAngle and covers sweepAngle. Its ends are flat.
Written by systems::ProgressIndicator and systems::LoadingIndicator, every frame while they animate, or by the application. Read by systems::ArcRender in the Render phase, with the entity's Transform, Bound and Color (the color of the arc).
| using guillaume::components::Arc::SegmentCount = int |
|
explicit |
| Arc::SegmentCount guillaume::components::Arc::getSegments | ( | void | ) | const |
| float guillaume::components::Arc::getStartAngle | ( | void | ) | const |
| float guillaume::components::Arc::getSweepAngle | ( | void | ) | const |
| float guillaume::components::Arc::getThickness | ( | void | ) | const |
| Arc & guillaume::components::Arc::setSegments | ( | SegmentCount | segments | ) |
Set how many straight segments approximate the arc.
More segments give a smoother curve for more triangles. Marks the component changed only when the value differs.
| segments | The segment count over the whole sweep; systems::ArcRender draws at least 1. |
Definition at line 85 of file arc.cpp.

| Arc & guillaume::components::Arc::setStartAngle | ( | float | startAngle | ) |
Set the angle the arc starts at.
Marks the component changed only when the value differs.
| startAngle | The start angle, in radians; 0 points right and -pi / 2 points up. |
Definition at line 55 of file arc.cpp.


| Arc & guillaume::components::Arc::setSweepAngle | ( | float | sweepAngle | ) |
Set the angle the arc covers from its start angle.
Marks the component changed only when the value differs.
| sweepAngle | The sweep, in radians: 2 * pi is a full turn, and a positive value turns clockwise on screen. |
Definition at line 70 of file arc.cpp.


| Arc & guillaume::components::Arc::setThickness | ( | float | thickness | ) |
Set the thickness of the arc.
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 40 of file arc.cpp.

