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:
authorrachytski <siarhei.rachytski@gmail.com>2012-12-09 01:17:23 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:47:50 +0300
commit67907b5423e2c88b70579b7b06f361610ade7c3b (patch)
tree9007c16e6aff78af2814ef1c8d901b9b6d27b103 /graphics/text_element.cpp
parentc92a5801305a2a2f9e3d3132c28e190133c4eddf (diff)
refactored ResourceStyle and lot of *Info classes into consistent Resource and Resource::Info system.
Diffstat (limited to 'graphics/text_element.cpp')
-rw-r--r--graphics/text_element.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/graphics/text_element.cpp b/graphics/text_element.cpp
index 5dece92cd4..2c8fdab4e1 100644
--- a/graphics/text_element.cpp
+++ b/graphics/text_element.cpp
@@ -4,7 +4,8 @@
#include "resource_cache.hpp"
#include "resource_manager.hpp"
#include "overlay_renderer.hpp"
-#include "resource_style.hpp"
+#include "glyph.hpp"
+#include "resource.hpp"
#include "../base/logging.hpp"
@@ -106,8 +107,8 @@ namespace graphics
fontDesc.m_size,
fontDesc.m_isMasked,
fontDesc.m_isMasked ? fontDesc.m_maskColor : fontDesc.m_color);
- uint32_t const glyphID = skin->mapGlyph(glyphKey, screen->glyphCache());
- GlyphStyle const * glyphStyle = static_cast<GlyphStyle const *>(skin->fromID(glyphID));
+ uint32_t const glyphID = skin->map(Glyph::Info(glyphKey, screen->glyphCache()));
+ Glyph const * glyph = static_cast<Glyph const *>(skin->fromID(glyphID));
m2::PointD glyphPt;
ang::AngleD glyphAngle;
@@ -120,14 +121,14 @@ namespace graphics
offsPt.x -= fullPt.x - floor(fullPt.x);
offsPt.y -= fullPt.y - floor(fullPt.y);
- screen->drawStraightGlyph(pv, offsPt, glyphStyle, depth);
+ screen->drawStraightGlyph(pv, offsPt, glyph, depth);
}
else
{
glyphPt = (pv + offs + elem.m_pt) * m;
glyphAngle = ang::AngleD(elem.m_angle.val() + deltaA);
- screen->drawGlyph(glyphPt, m2::PointD(0.0, 0.0), glyphAngle, 0, glyphStyle, depth);
+ screen->drawGlyph(glyphPt, m2::PointD(0.0, 0.0), glyphAngle, 0, glyph, depth);
}
}
}