removed GlobalRect in InformationDisplay.

This commit is contained in:
rachytski 2011-10-06 13:10:22 +03:00 committed by Alex Zolotarev
parent 9eb5fed75d
commit 52109d58dc
4 changed files with 0 additions and 44 deletions

View file

@ -151,10 +151,6 @@ BenchmarkFramework<TModel>::BenchmarkFramework(shared_ptr<WindowHandle> const &
m_startTime = my::FormatCurrentTime();
#ifdef DEBUG
base_type::m_informationDisplay.enableGlobalRect(false);
#endif
base_type::m_informationDisplay.enableBenchmarkInfo(true);
}

View file

@ -108,10 +108,6 @@ Framework<TModel>::Framework(shared_ptr<WindowHandle> windowHandle,
m_informationDisplay.enableDebugPoints(true);
#endif
#ifdef DEBUG
m_informationDisplay.enableGlobalRect(true);
#endif
m_informationDisplay.enableCenter(true);
m_informationDisplay.enableRuler(true);
m_informationDisplay.setRulerParams(m_minRulerWidth, m_metresMinWidth, m_metresMaxWidth);
@ -373,7 +369,6 @@ void Framework<TModel>::DoPaint(shared_ptr<PaintEvent> const & e)
m2::PointD const center = m_navigator.Screen().GlobalRect().GlobalCenter();
m_informationDisplay.setGlobalRect(m_navigator.Screen().GlobalRect());
m_informationDisplay.setCenter(m2::PointD(MercatorBounds::XToLon(center.x), MercatorBounds::YToLat(center.y)));
e->drawer()->screen()->beginFrame();

View file

@ -28,7 +28,6 @@ InformationDisplay::InformationDisplay()
enableDebugInfo(false);
enableMemoryWarning(false);
enableBenchmarkInfo(false);
enableGlobalRect(false);
enableEmptyModelMessage(false);
for (int i = 0; i < sizeof(m_DebugPts) / sizeof(m2::PointD); ++i)
@ -105,7 +104,6 @@ void InformationDisplay::drawRuler(DrawerYG * pDrawer)
m_ruler.update();
m_ruler.draw(pDrawer->screen().get(), math::Identity<double, 3>());
// pDrawer->screen()->drawRectangle(m2::Inflate(m2::RectD(pivot, pivot), 2.0, 2.0), yg::Color(0, 0, 0, 255), yg::maxDepth);
}
void InformationDisplay::setVisualScale(double visualScale)
@ -163,30 +161,6 @@ void InformationDisplay::drawCenter(DrawerYG * drawer)
ste.draw(drawer->screen().get(), math::Identity<double, 3>());
}
void InformationDisplay::enableGlobalRect(bool doEnable)
{
m_isGlobalRectEnabled = doEnable;
}
void InformationDisplay::setGlobalRect(m2::AnyRectD const & r)
{
m_globalRect = r;
}
void InformationDisplay::drawGlobalRect(DrawerYG *pDrawer)
{
m_yOffset += 20;
ostringstream out;
/* out << "(" << m_globalRect.minX() << ", " << m_globalRect.minY() << ", " << m_globalRect.maxX() << ", " << m_globalRect.maxY() << ") Scale : " << m_currentScale;
pDrawer->screen()->drawText(
m_fontDesc,
m2::PointD(m_displayRect.minX() + 10, m_displayRect.minY() + m_yOffset),
yg::EPosAboveRight,
out.str().c_str(),
yg::maxDepth,
false);*/
}
void InformationDisplay::enableDebugInfo(bool doEnable)
{
m_isDebugInfoEnabled = doEnable;
@ -434,8 +408,6 @@ void InformationDisplay::doDraw(DrawerYG *drawer)
drawRuler(drawer);
if (m_isCenterEnabled)
drawCenter(drawer);
if (m_isGlobalRectEnabled)
drawGlobalRect(drawer);
if (m_isDebugInfoEnabled)
drawDebugInfo(drawer);
if (m_isMemoryWarningEnabled)

View file

@ -40,9 +40,6 @@ private:
m2::PointD m_centerPtLonLat;
int m_currentScale;
bool m_isGlobalRectEnabled;
m2::AnyRectD m_globalRect;
bool m_isDebugInfoEnabled;
double m_frameDuration;
@ -92,10 +89,6 @@ public:
void setCenter(m2::PointD const & latLongPt);
void drawCenter(DrawerYG * pDrawer);
void enableGlobalRect(bool doEnable);
void setGlobalRect(m2::AnyRectD const & r);
void drawGlobalRect(DrawerYG * pDrawer);
void enableDebugInfo(bool doEnable);
void setDebugInfo(double frameDuration, int currentScale);
void drawDebugInfo(DrawerYG * pDrawer);