From c1ffccff77a931eab6bc6d09030d02c7de7b720f Mon Sep 17 00:00:00 2001 From: rachytski Date: Sun, 9 Jan 2011 14:56:30 +0200 Subject: [PATCH] Debugging drawText --- yg/text_renderer.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/yg/text_renderer.cpp b/yg/text_renderer.cpp index 23681283ee..f91d93bcac 100644 --- a/yg/text_renderer.cpp +++ b/yg/text_renderer.cpp @@ -57,27 +57,30 @@ namespace yg double depth) { TextObj obj(pt, utf8Text, fontSize, depth); - m_tree.ReplaceIf(obj, obj.GetLimitRect(this), TextObj::better_depth()); + m2::RectD r = obj.GetLimitRect(this); + /* + m2::PointD pts[5] = + { + m2::PointD(r.minX(), r.minY()), + m2::PointD(r.minX(), r.maxY()), + m2::PointD(r.maxX(), r.maxY()), + m2::PointD(r.maxX(), r.minY()), + m2::PointD(r.minX(), r.minY()) + }; + + drawPath(pts, 5, skin()->mapPenInfo(yg::PenInfo(yg::Color(0, 0, 0, 255), 2, 0, 0, 0)), depth); + */ + + m_tree.ReplaceIf(obj, r, TextObj::better_depth()); } void TextRenderer::endFrame() { shared_ptr rt; -/* if ((m_useTextLayer) && (renderState())) - { - rt = renderTarget(); - setRenderTarget(renderState()->m_backBufferLayers[1]); - clear(yg::Color(255, 255, 255, 0), true, 1.0, false); - } - */ - m_tree.ForEach(bind(&TextObj::Draw, _1, this)); m_tree.Clear(); -/* if ((m_useTextLayer) && (renderState())) - setRenderTarget(rt); - */ base_t::endFrame(); } }