diff options
author | crupest <crupest@outlook.com> | 2021-08-22 21:15:33 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-08-22 21:15:33 +0800 |
commit | 7fa6f61b1d7b253f749be73a4bfeee9a77cd2e88 (patch) | |
tree | 387d0d8e18c581a7fcced157817f0b81c33c17e5 /include/cru/platform | |
parent | c0616e3892e4f713bea7abd217191b8713a1d1bf (diff) | |
download | cru-7fa6f61b1d7b253f749be73a4bfeee9a77cd2e88.tar.gz cru-7fa6f61b1d7b253f749be73a4bfeee9a77cd2e88.tar.bz2 cru-7fa6f61b1d7b253f749be73a4bfeee9a77cd2e88.zip |
...
Diffstat (limited to 'include/cru/platform')
-rw-r--r-- | include/cru/platform/Color.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/cru/platform/Color.hpp b/include/cru/platform/Color.hpp index a6793269..3388de25 100644 --- a/include/cru/platform/Color.hpp +++ b/include/cru/platform/Color.hpp @@ -32,6 +32,11 @@ struct CRU_PLATFORM_API Color { return result; } + float GetFloatRed() const { return static_cast<float>(red) / 255.f; } + float GetFloatGreen() const { return static_cast<float>(green) / 255.f; } + float GetFloatBlue() const { return static_cast<float>(blue) / 255.f; } + float GetFloatAlpha() const { return static_cast<float>(alpha) / 255.f; } + std::string ToUtf8String() const; std::u16string ToString() const; |