|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
The opacity of each StateLayer, 0 to 1. More...
#include <headers/guillaume/theme/tokens.hpp>
Public Member Functions | |
| StateLayerScale (void) | |
| Create the scale with the Material 3 baseline opacities. | |
| float | getOpacity (StateLayer layer) const |
| Get the opacity of a state layer. | |
| std::uint8_t | getAlpha (StateLayer layer) const |
| Get the opacity of a state layer as an alpha channel value. | |
| void | setOpacity (StateLayer layer, float opacity) |
| Replace the opacity of a state layer. | |
The opacity of each StateLayer, 0 to 1.
The defaults are the Material 3 values listed in StateLayer. Read them through guillaume::getStateLayerAlpha, which returns the opacity as an alpha channel value ready to put in a color.
Definition at line 242 of file tokens.hpp.
| guillaume::theme::StateLayerScale::StateLayerScale | ( | void | ) |
Create the scale with the Material 3 baseline opacities.
Definition at line 101 of file tokens.cpp.


| std::uint8_t guillaume::theme::StateLayerScale::getAlpha | ( | StateLayer | layer | ) | const |
Get the opacity of a state layer as an alpha channel value.
| layer | The state layer to look up. |
| std::out_of_range | When layer is StateLayer::Count. |
Definition at line 111 of file tokens.cpp.

| float guillaume::theme::StateLayerScale::getOpacity | ( | StateLayer | layer | ) | const |
Get the opacity of a state layer.
| layer | The state layer to look up. |
| std::out_of_range | When layer is StateLayer::Count. |
Definition at line 106 of file tokens.cpp.

| void guillaume::theme::StateLayerScale::setOpacity | ( | StateLayer | layer, |
| float | opacity ) |
Replace the opacity of a state layer.
| layer | The state layer to change. |
| opacity | The new opacity, 0 to 1. |
| std::out_of_range | When layer is StateLayer::Count. |
| std::invalid_argument | When opacity is outside 0 to 1. |
Definition at line 117 of file tokens.cpp.