diff options
author | crupest <crupest@outlook.com> | 2021-02-24 23:01:15 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-02-24 23:01:15 +0800 |
commit | 9c2f860ea80310f87b62a2947b4ddea5e7d85587 (patch) | |
tree | e912a13eb2e82b6874340fe2833989d62525c761 /include/cru/platform/GraphBase.hpp | |
parent | 1e1170a89330881c5fad60988bc27c824dfcf454 (diff) | |
download | cru-9c2f860ea80310f87b62a2947b4ddea5e7d85587.tar.gz cru-9c2f860ea80310f87b62a2947b4ddea5e7d85587.tar.bz2 cru-9c2f860ea80310f87b62a2947b4ddea5e7d85587.zip |
feat: Scroll bar. Only collapse state.
Diffstat (limited to 'include/cru/platform/GraphBase.hpp')
-rw-r--r-- | include/cru/platform/GraphBase.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/cru/platform/GraphBase.hpp b/include/cru/platform/GraphBase.hpp index b580ad31..6bf2736f 100644 --- a/include/cru/platform/GraphBase.hpp +++ b/include/cru/platform/GraphBase.hpp @@ -316,6 +316,12 @@ struct Color { (hex >> 24) & mask); } + constexpr Color WithAlpha(std::uint8_t new_alpha) const { + auto result = *this; + result.alpha = new_alpha; + return result; + } + std::uint8_t red; std::uint8_t green; std::uint8_t blue; |