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:
authorDaria Volvenkova <d.volvenkova@corp.mail.ru>2016-06-28 12:54:31 +0300
committerDaria Volvenkova <d.volvenkova@corp.mail.ru>2016-07-07 15:31:10 +0300
commit5bd3d26105c12dc662d0b6e118e9b436abb093bd (patch)
tree01e9a654421f66e2dd8041b28ec94f55cac4b821 /geometry
parent599063085a467816be63fc93ba505150e7d67281 (diff)
Set center fixed.
Diffstat (limited to 'geometry')
-rw-r--r--geometry/screenbase.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/geometry/screenbase.cpp b/geometry/screenbase.cpp
index 1bb0855914..93693b167b 100644
--- a/geometry/screenbase.cpp
+++ b/geometry/screenbase.cpp
@@ -145,22 +145,7 @@ void ScreenBase::SetFromRect(m2::AnyRectD const & glbRect)
void ScreenBase::SetFromRect2d(m2::AnyRectD const & glbRect)
{
- double hScale = glbRect.GetLocalRect().SizeX() / PixelRectIn3d().SizeX();
- double vScale = glbRect.GetLocalRect().SizeY() / PixelRectIn3d().SizeY();
- double scale = max(hScale, vScale);
-
- m_Scale = scale;
- m_Angle = glbRect.Angle();
- m_Org = glbRect.GlobalCenter();
-
- UpdateDependentParameters();
-
-/* m2::PointD g_target(0.0, -glbRect.GetLocalRect().SizeY() * scale / vScale / 2.0);
- g_target.Rotate(glbRect.Angle().val());
- g_target = glbRect.GlobalCenter() + g_target;
- m2::PointD p_target(m_PixelRect.SizeX() / 2.0, m_PixelRect.SizeY());
- MatchGandP(g_target, p_target);*/
-
+ SetFromRects(glbRect, PixelRectIn3d());
MatchGandP3d(glbRect.GlobalCenter(), PixelRectIn3d().Center());
}