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:
authorConstantin Shalnev <c.shalnev@corp.mail.ru>2015-12-08 17:47:18 +0300
committerIlya Zverev <ilya@zverev.info>2017-07-04 11:26:12 +0300
commit93035f266a9b1efa135e16eacb114ec5d73959c4 (patch)
tree951076ed1ca531dacb5dd0b5429563183272e5dd /indexer/scales_patch.hpp
parent5830ef2737b73a58bd6bf1f0a1fd7542e119221d (diff)
The MAPS.ME.Designer tool for DRAPE 2.0
Diffstat (limited to 'indexer/scales_patch.hpp')
-rw-r--r--indexer/scales_patch.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indexer/scales_patch.hpp b/indexer/scales_patch.hpp
new file mode 100644
index 0000000000..cabb4bf74e
--- /dev/null
+++ b/indexer/scales_patch.hpp
@@ -0,0 +1,28 @@
+#pragma once
+
+#include "scales.hpp"
+
+#ifdef BUILD_DESIGNER
+
+enum { kPatchScaleShift = 3 };
+
+inline uint32_t PatchMinDrawableScale(uint32_t s)
+{
+ return (s < kPatchScaleShift ? 0 : s - kPatchScaleShift);
+}
+
+inline uint32_t PatchScaleBound(uint32_t s)
+{
+ s += kPatchScaleShift;
+ if (s > scales::GetUpperScale())
+ s = scales::GetUpperScale();
+ return s;
+}
+
+#else // BUILD_DESIGNER
+
+inline uint32_t PatchMinDrawableScale(uint32_t s) { return s; }
+
+inline uint32_t PatchScaleBound(uint32_t s) { return s; }
+
+#endif // BUILD_DESIGNER