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:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2015-05-25 10:08:39 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:48:15 +0300
commit97e3dbbd2153b62d60ffe9281f2890d98956a2d4 (patch)
tree4f18360b9d9bac32486ac52a8afbb106d58013c6 /map/information_display.cpp
parentccdcd85f9f0ced581a8be6ba4d18758159cbc3c1 (diff)
Ability to get size of some maps widgets.
Diffstat (limited to 'map/information_display.cpp')
-rw-r--r--map/information_display.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/map/information_display.cpp b/map/information_display.cpp
index 714400cb89..ac8ba8f21b 100644
--- a/map/information_display.cpp
+++ b/map/information_display.cpp
@@ -314,3 +314,22 @@ void InformationDisplay::SetWidgetPivot(WidgetType widget, m2::PointD const & pi
ASSERT(false, ());
}
}
+
+m2::PointD InformationDisplay::GetWidgetSize(WidgetType widget) const
+{
+ m2::RectD boundRect;
+ switch(widget)
+ {
+ case WidgetType::Ruler:
+ boundRect = m_ruler->GetBoundRect();
+ break;
+ case WidgetType::CompassArrow:
+ return m_compassArrow->GetPixelSize();
+ case WidgetType::DebugLable:
+ case WidgetType::CountryStatusDisplay:
+ case WidgetType::CopyrightLabel:
+ default:
+ ASSERT(false, ());
+ }
+ return m2::PointD(boundRect.SizeX(), boundRect.SizeY());
+}