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>2015-11-11 10:42:12 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2015-11-30 16:28:02 +0300
commit2e5a22737248bcdad96d5c0f1f3b11c961039619 (patch)
tree01ee497709d968ddfff622036430c7e94fa9d2aa /drape/overlay_handle.hpp
parent4f4dbbb6b6349184391c6a9911134a9966983573 (diff)
New overlay comparison function
Diffstat (limited to 'drape/overlay_handle.hpp')
-rw-r--r--drape/overlay_handle.hpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/drape/overlay_handle.hpp b/drape/overlay_handle.hpp
index e05ff00f24..5e487ec47c 100644
--- a/drape/overlay_handle.hpp
+++ b/drape/overlay_handle.hpp
@@ -22,9 +22,7 @@ class OverlayHandle
public:
typedef vector<m2::RectF> Rects;
- OverlayHandle(FeatureID const & id,
- dp::Anchor anchor,
- double priority);
+ OverlayHandle(FeatureID const & id, dp::Anchor anchor, uint64_t priority);
virtual ~OverlayHandle() {}
@@ -50,12 +48,12 @@ public:
void AddDynamicAttribute(BindingInfo const & binding, uint32_t offset, uint32_t count);
FeatureID const & GetFeatureID() const;
- double const & GetPriority() const;
+ uint64_t const & GetPriority() const;
protected:
FeatureID const m_id;
dp::Anchor const m_anchor;
- double const m_priority;
+ uint64_t const m_priority;
typedef pair<BindingInfo, MutateRegion> TOffsetNode;
TOffsetNode const & GetOffsetNode(uint8_t bufferID) const;
@@ -79,13 +77,14 @@ private:
class SquareHandle : public OverlayHandle
{
- typedef OverlayHandle base_t;
+ using TBase = OverlayHandle;
+
public:
SquareHandle(FeatureID const & id,
dp::Anchor anchor,
m2::PointD const & gbPivot,
m2::PointD const & pxSize,
- double priority);
+ uint64_t priority);
virtual m2::RectD GetPixelRect(ScreenBase const & screen) const;
virtual void GetPixelShape(ScreenBase const & screen, Rects & rects) const;
@@ -95,4 +94,6 @@ private:
m2::PointD m_pxHalfSize;
};
+uint64_t CalculateOverlayPriority(int minZoomLevel, uint8_t rank, float depth);
+
} // namespace dp