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>2014-11-18 10:47:39 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:32:46 +0300
commit69f4cf69c86d7709bc6688126f4d853ad554d3e7 (patch)
tree1a7f233551aadd1780d70ca6a881f24c85015076 /drape_frontend
parent455b076ef46d44fbe9680a278d16fabe69b47d4b (diff)
[drape] remove useless. Add debug rendering.
Diffstat (limited to 'drape_frontend')
-rw-r--r--drape_frontend/engine_context.cpp42
-rw-r--r--drape_frontend/engine_context.hpp2
2 files changed, 42 insertions, 2 deletions
diff --git a/drape_frontend/engine_context.cpp b/drape_frontend/engine_context.cpp
index 304f833087..35d0c76bd7 100644
--- a/drape_frontend/engine_context.cpp
+++ b/drape_frontend/engine_context.cpp
@@ -1,7 +1,15 @@
#include "engine_context.hpp"
+//#define DRAW_TILE_NET
+
#include "message_subclasses.hpp"
#include "map_shape.hpp"
+#ifdef DRAW_TILE_NET
+#include "line_shape.hpp"
+#include "text_shape.hpp"
+
+#include "../base/string_utils.hpp"
+#endif
namespace df
{
@@ -23,6 +31,40 @@ void EngineContext::InsertShape(TileKey const & key, dp::TransferPointer<MapShap
void EngineContext::EndReadTile(TileKey const & key)
{
+#ifdef DRAW_TILE_NET
+ m2::RectD r = key.GetGlobalRect();
+ vector<m2::PointD> path;
+ path.push_back(r.LeftBottom());
+ path.push_back(r.LeftTop());
+ path.push_back(r.RightTop());
+ path.push_back(r.RightBottom());
+ path.push_back(r.LeftBottom());
+
+ m2::SharedSpline spline(path);
+ df::LineViewParams p;
+ p.m_baseGtoPScale = 1.0;
+ p.m_cap = dp::ButtCap;
+ p.m_color = dp::Color(255, 0, 0, 255);
+ p.m_depth = 20000;
+ p.m_width = 5;
+ p.m_join = dp::RoundJoin;
+
+ InsertShape(key, dp::MovePointer<df::MapShape>(new LineShape(spline, p)));
+
+ df::TextViewParams tp;
+ tp.m_anchor = dp::Center;
+ tp.m_depth = 20000;
+ tp.m_primaryText = strings::to_string(key.m_x) + " " +
+ strings::to_string(key.m_y) + " " +
+ strings::to_string(key.m_zoomLevel);
+
+ tp.m_primaryTextFont = df::FontDecl{ dp::Color(255, 0, 0, 255),
+ dp::Color(0, 0, 0, 0),
+ 30, true};
+
+ InsertShape(key, dp::MovePointer<df::MapShape>(new TextShape(r.Center(), tp)));
+#endif
+
PostMessage(new TileReadEndMessage(key));
}
diff --git a/drape_frontend/engine_context.hpp b/drape_frontend/engine_context.hpp
index 0bcf28a0d0..875717d7f9 100644
--- a/drape_frontend/engine_context.hpp
+++ b/drape_frontend/engine_context.hpp
@@ -4,8 +4,6 @@
#include "../drape/pointers.hpp"
-#include "../map/scales_processor.hpp"
-
namespace df
{