Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2017-02-09 17:17:52 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2017-02-09 17:17:52 +0300
commit80c552968693003e9455dd95543f72b0ce64f2ad (patch)
tree31a17de37688aa3b09ad72920e9dda267d8bf17c /indexer/drawing_rules.hpp
parentae612d2384ad64d5705bee8316ed9edb5ba1cade (diff)
Obtaining colors from style
Diffstat (limited to 'indexer/drawing_rules.hpp')
-rw-r--r--indexer/drawing_rules.hpp5
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();