diff options
author | Constantin Shalnev <c.shalnev@corp.mail.ru> | 2015-08-21 13:33:54 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:02:06 +0300 |
commit | 1c69060932b586c4af1e6eab33076b6e9c147af3 (patch) | |
tree | 04bb2014209037ba708bb1c6563e3cc678c273f8 /indexer/drawing_rules.cpp | |
parent | 1e6bad85f20e8ca2db8e1c2e438bbf7af455d9f6 (diff) |
Added Shield class in DrawingRules
Diffstat (limited to 'indexer/drawing_rules.cpp')
-rw-r--r-- | indexer/drawing_rules.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indexer/drawing_rules.cpp b/indexer/drawing_rules.cpp index fa78019104..3dd98076af 100644 --- a/indexer/drawing_rules.cpp +++ b/indexer/drawing_rules.cpp @@ -84,6 +84,11 @@ CircleRuleProto const * BaseRule::GetCircle() const return 0; } +ShieldRuleProto const * BaseRule::GetShield() const +{ + return nullptr; +} + RulesHolder::RulesHolder() : m_bgColors(scales::UPPER_STYLE_SCALE+1, DEFAULT_BG_COLOR) {} @@ -239,6 +244,15 @@ namespace virtual CircleRuleProto const * GetCircle() const { return &m_circle; } }; + + class Shield : public BaseRule + { + ShieldRuleProto m_shield; + public: + Shield(ShieldRuleProto const & r) : m_shield(r) {} + + virtual ShieldRuleProto const * GetShield() const { return &m_shield; } + }; } class DoSetIndex @@ -350,6 +364,9 @@ namespace if (de.has_path_text()) AddRule<PathText>(p, de.scale(), pathtext, de.path_text()); + + if (de.has_shield()) + AddRule<Shield>(p, de.scale(), shield, de.shield()); } } |