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:
authorExMix <rahuba.youri@mapswithme.com>2013-05-31 18:30:45 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:55:58 +0300
commitc9324a88ab18055f085662c7e9dd7c68dc89eb81 (patch)
tree04cc8aadfe9d24260edf5d925fa2242dcd9c2de5 /graphics
parent4a1a41715ddf2759aaccf3f5d8acaa3191b19cb8 (diff)
after review fixes
Diffstat (limited to 'graphics')
-rw-r--r--graphics/glyph_layout.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/graphics/glyph_layout.cpp b/graphics/glyph_layout.cpp
index 7e9e0d86ad..e801243397 100644
--- a/graphics/glyph_layout.cpp
+++ b/graphics/glyph_layout.cpp
@@ -224,7 +224,7 @@ namespace graphics
bool isFirst = true;
- strings::UniChar dotSymbol = strings::MakeUniString(".")[0];
+ strings::UniChar dotSymbol = '.';
GlyphKey dotKey(dotSymbol,
fontDesc.m_size,
false,
@@ -253,21 +253,24 @@ namespace graphics
boundRect.Inflate(2, 2);
- m2::PointD ptOffs(-boundRect.SizeX() / 2 - boundRect.minX(),
- -boundRect.SizeY() / 2 - boundRect.minY());
+ double halfSizeX = boundRect.SizeX() / 2.0;
+ double halfSizeY = boundRect.SizeY() / 2.0;
+
+ m2::PointD ptOffs(-halfSizeX - boundRect.minX(),
+ -halfSizeY - boundRect.minY());
// adjusting according to position
if (pos & EPosLeft)
- ptOffs += m2::PointD(-boundRect.SizeX() / 2, 0);
+ ptOffs += m2::PointD(-halfSizeX, 0);
if (pos & EPosRight)
- ptOffs += m2::PointD(boundRect.SizeX() / 2, 0);
+ ptOffs += m2::PointD(halfSizeX, 0);
if (pos & EPosAbove)
- ptOffs += m2::PointD(0, -boundRect.SizeY() / 2);
+ ptOffs += m2::PointD(0, -halfSizeY);
if (pos & EPosUnder)
- ptOffs += m2::PointD(0, boundRect.SizeY() / 2);
+ ptOffs += m2::PointD(0, halfSizeY);
for (unsigned i = 0; i < m_entries.size(); ++i)
m_entries[i].m_pt += ptOffs;