diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2017-02-09 17:17:52 +0300 |
---|---|---|
committer | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2017-02-09 17:17:52 +0300 |
commit | 80c552968693003e9455dd95543f72b0ce64f2ad (patch) | |
tree | 31a17de37688aa3b09ad72920e9dda267d8bf17c /indexer/drawing_rules.hpp | |
parent | ae612d2384ad64d5705bee8316ed9edb5ba1cade (diff) |
Obtaining colors from style
Diffstat (limited to 'indexer/drawing_rules.hpp')
-rw-r--r-- | indexer/drawing_rules.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indexer/drawing_rules.hpp b/indexer/drawing_rules.hpp index 317e971ed5..a2f941dfcb 100644 --- a/indexer/drawing_rules.hpp +++ b/indexer/drawing_rules.hpp @@ -14,6 +14,7 @@ #include "std/iostream.hpp" #include "std/target_os.hpp" +#include <unordered_map> class LineDefProto; class AreaRuleProto; @@ -78,6 +79,8 @@ namespace drule /// background color for scales in range [0...scales::UPPER_STYLE_SCALE] vector<uint32_t> m_bgColors; + std::unordered_map<std::string, uint32_t> m_colors; + public: RulesHolder(); ~RulesHolder(); @@ -92,6 +95,7 @@ namespace drule BaseRule const * Find(Key const & k) const; uint32_t GetBgColor(int scale) const; + uint32_t GetColor(std::string const & name) const; #ifdef OMIM_OS_DESKTOP void LoadFromTextProto(string const & buffer); @@ -118,6 +122,7 @@ namespace drule private: void InitBackgroundColors(ContainerProto const & cp); + void InitColors(ContainerProto const & cp); }; RulesHolder & rules(); |