mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-07 13:03:54 +00:00
[android] Load predefined colors from core
Signed-off-by: Andrei Shkrob <github@shkrob.dev>
This commit is contained in:
committed by
Konstantin Pastbin
parent
ebc5370052
commit
d9335c0b6c
@@ -26,6 +26,11 @@ struct Color
|
||||
constexpr uint8_t GetBlue() const { return ExtractByte(m_rgba, 1); }
|
||||
constexpr uint8_t GetAlpha() const { return ExtractByte(m_rgba, 0); }
|
||||
constexpr uint32_t GetRGBA() const { return m_rgba; }
|
||||
constexpr uint32_t GetARGB() const
|
||||
{
|
||||
return (static_cast<uint32_t>(GetAlpha()) << 24) | (static_cast<uint32_t>(GetRed()) << 16) |
|
||||
(static_cast<uint32_t>(GetGreen()) << 8) | static_cast<uint32_t>(GetBlue());
|
||||
}
|
||||
|
||||
constexpr float GetRedF() const { return ChannelToFloat(GetRed()); }
|
||||
constexpr float GetGreenF() const { return ChannelToFloat(GetGreen()); }
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
|
||||
namespace kml
|
||||
{
|
||||
/// @note Important! Should be synced with android/app/src/main/java/app/organicmaps/bookmarks/data/Icon.java
|
||||
enum class PredefinedColor : uint8_t
|
||||
{
|
||||
None = 0,
|
||||
|
||||
Reference in New Issue
Block a user