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
path: root/drape
diff options
context:
space:
mode:
authorExMix <rahuba.youri@mapswithme.com>2014-12-30 16:07:43 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:35:49 +0300
commitd2fc96877bed33715d201088f8616d5ba2360780 (patch)
tree6261704b2987570387110ee24e5a25411ff9dd4b /drape
parent462aa62950543c91949736e2bc9665669c03cfbd (diff)
[drape] minor changes
Diffstat (limited to 'drape')
-rw-r--r--drape/color.hpp8
-rw-r--r--drape/overlay_handle.cpp2
-rw-r--r--drape/overlay_tree.cpp7
-rw-r--r--drape/sdf_image.cpp2
4 files changed, 13 insertions, 6 deletions
diff --git a/drape/color.hpp b/drape/color.hpp
index 44a0e4c743..2507c13a39 100644
--- a/drape/color.hpp
+++ b/drape/color.hpp
@@ -17,9 +17,11 @@ struct Color
bool operator< (Color const & other) const { return m_rgba < other.m_rgba; }
- static Color Black() { return Color(0, 0, 0, 255); }
- static Color White() { return Color(255, 255, 255, 255); }
- static Color Red() { return Color(255, 0, 0, 255); }
+ static Color Black() { return Color(0, 0, 0, 255); }
+ static Color White() { return Color(255, 255, 255, 255); }
+ static Color Red() { return Color(255, 0, 0, 255); }
+ static Color Transparent() { return Color(0, 0, 0, 0); }
+ static Color RoadNumberOutline() { return Color(150, 75, 0, 255); }
private:
uint32_t m_rgba;
diff --git a/drape/overlay_handle.cpp b/drape/overlay_handle.cpp
index d14a8e6125..ee63b58086 100644
--- a/drape/overlay_handle.cpp
+++ b/drape/overlay_handle.cpp
@@ -44,7 +44,7 @@ void OverlayHandle::SetIsVisible(bool isVisible)
m_isVisible = isVisible;
}
-bool OverlayHandle::IsIntersect(ScreenBase const & screen, const OverlayHandle & h) const
+bool OverlayHandle::IsIntersect(ScreenBase const & screen, OverlayHandle const & h) const
{
Rects ar1;
Rects ar2;
diff --git a/drape/overlay_tree.cpp b/drape/overlay_tree.cpp
index d9e3367912..478f225463 100644
--- a/drape/overlay_tree.cpp
+++ b/drape/overlay_tree.cpp
@@ -21,8 +21,13 @@ void OverlayTree::Add(RefPointer<OverlayHandle> handle)
if (!handle->IsValid())
return;
-
+
m2::RectD const pixelRect = handle->GetPixelRect(modelView);
+ if (!m_traits.m_modelView.PixelRect().IsIntersect(pixelRect))
+ {
+ handle->SetIsVisible(false);
+ return;
+ }
typedef buffer_vector<RefPointer<OverlayHandle>, 8> OverlayContainerT;
OverlayContainerT elements;
diff --git a/drape/sdf_image.cpp b/drape/sdf_image.cpp
index 28aa6409a7..76f3ea8978 100644
--- a/drape/sdf_image.cpp
+++ b/drape/sdf_image.cpp
@@ -171,7 +171,7 @@ void SdfImage::GenerateSDF(float sc)
outside.Minus(inside);
outside.Distquant();
- //outside.Invert();
+ outside.Invert();
*this = outside.Bilinear(sc);
}