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

scales_patch.hpp « indexer - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cabb4bf74ee009dc9a406e052f8da6a65250daf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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