renamed InfoLayer into Overlay.

This commit is contained in:
rachytski 2012-05-23 19:13:37 +04:00 committed by Alex Zolotarev
parent f21276bbc1
commit b1db3743fd
19 changed files with 113 additions and 113 deletions

View file

@ -3,7 +3,7 @@
#include "render_policy.hpp"
#include "../std/shared_ptr.hpp"
#include "../yg/info_layer.hpp"
#include "../yg/overlay.hpp"
class TileRenderer;
class CoverageGenerator;

View file

@ -7,7 +7,7 @@
#include "../geometry/screenbase.hpp"
#include "../yg/info_layer.hpp"
#include "../yg/overlay.hpp"
#include "../base/thread.hpp"
#include "../base/threaded_list.hpp"

View file

@ -29,7 +29,7 @@
#include "../yg/render_state.hpp"
#include "../yg/skin.hpp"
#include "../yg/resource_manager.hpp"
#include "../yg/info_layer.hpp"
#include "../yg/overlay.hpp"
#include "../coding/file_reader.hpp"
#include "../coding/file_writer.hpp"

View file

@ -295,9 +295,9 @@ void RenderQueueRoutine::Do()
m2::RectI surfaceRect;
m2::RectI textureRect;
shared_ptr<yg::InfoLayer> infoLayer(new yg::InfoLayer());
infoLayer->setCouldOverlap(false);
m_threadDrawer->screen()->setInfoLayer(infoLayer);
shared_ptr<yg::Overlay> overlay(new yg::Overlay());
overlay->setCouldOverlap(false);
m_threadDrawer->screen()->setOverlay(overlay);
while (!IsCancelled())
{
@ -348,7 +348,7 @@ void RenderQueueRoutine::Do()
areas.clear();
areas.push_back(curRect);
fullRectRepaint = true;
m_threadDrawer->screen()->infoLayer()->clear();
m_threadDrawer->screen()->overlay()->clear();
m_renderState->m_doRepaintAll = false;
}
else
@ -374,14 +374,14 @@ void RenderQueueRoutine::Do()
if (!redrawTextRect.Intersect(oldRect))
redrawTextRect = m2::RectD(0, 0, 0, 0);
m_threadDrawer->screen()->infoLayer()->offset(
m_threadDrawer->screen()->overlay()->offset(
m2::PointD(0, 0) * offsetM,
redrawTextRect
);
}
else
{
m_threadDrawer->screen()->infoLayer()->clear();
m_threadDrawer->screen()->overlay()->clear();
m_renderState->m_isEmptyModelCurrent = true;
}
}
@ -480,7 +480,7 @@ void RenderQueueRoutine::Do()
m_threadDrawer->beginFrame();
m_threadDrawer->screen()->infoLayer()->draw(m_threadDrawer->screen().get(), math::Identity<double, 3>());
m_threadDrawer->screen()->overlay()->draw(m_threadDrawer->screen().get(), math::Identity<double, 3>());
m_threadDrawer->endFrame();
}

View file

@ -19,12 +19,12 @@
ScreenCoverage::ScreenCoverage()
: m_tiler(),
m_infoLayer(new yg::InfoLayer()),
m_overlay(new yg::Overlay()),
m_isEmptyDrawingCoverage(false),
m_isEmptyModelAtCoverageCenter(true),
m_leafTilesToRender(0)
{
m_infoLayer->setCouldOverlap(false);
m_overlay->setCouldOverlap(false);
}
ScreenCoverage::ScreenCoverage(TileRenderer * tileRenderer,
@ -32,13 +32,13 @@ ScreenCoverage::ScreenCoverage(TileRenderer * tileRenderer,
shared_ptr<yg::gl::Screen> const & cacheScreen)
: m_tileRenderer(tileRenderer),
m_coverageGenerator(coverageGenerator),
m_infoLayer(new yg::InfoLayer()),
m_overlay(new yg::Overlay()),
m_isEmptyDrawingCoverage(false),
m_isEmptyModelAtCoverageCenter(true),
m_leafTilesToRender(0),
m_cacheScreen(cacheScreen)
{
m_infoLayer->setCouldOverlap(false);
m_overlay->setCouldOverlap(false);
}
void ScreenCoverage::CopyInto(ScreenCoverage & cvg)
@ -68,7 +68,7 @@ void ScreenCoverage::CopyInto(ScreenCoverage & cvg)
tileCache->Unlock();
cvg.m_infoLayer.reset(m_infoLayer->clone());
cvg.m_overlay.reset(m_overlay->clone());
}
void ScreenCoverage::Clear()
@ -76,7 +76,7 @@ void ScreenCoverage::Clear()
m_tileRects.clear();
m_newTileRects.clear();
m_newLeafTileRects.clear();
m_infoLayer->clear();
m_overlay->clear();
m_isEmptyDrawingCoverage = false;
m_isEmptyModelAtCoverageCenter = true;
m_leafTilesToRender = 0;
@ -144,11 +144,11 @@ void ScreenCoverage::Merge(Tiler::RectInfo const & ri)
{
if (m_tiler.isLeaf(ri))
{
yg::InfoLayer * tileInfoLayerCopy = tile->m_infoLayer->clone();
m_infoLayer->merge(*tileInfoLayerCopy,
tile->m_tileScreen.PtoGMatrix() * m_screen.GtoPMatrix());
yg::Overlay * tileOverlayCopy = tile->m_overlay->clone();
m_overlay->merge(*tileOverlayCopy,
tile->m_tileScreen.PtoGMatrix() * m_screen.GtoPMatrix());
delete tileInfoLayerCopy;
delete tileOverlayCopy;
}
}
}
@ -185,7 +185,7 @@ void ScreenCoverage::Cache()
if (!infos.empty())
m_cacheScreen->blit(&infos[0], infos.size(), true);
m_infoLayer->draw(m_cacheScreen.get(), math::Identity<double, 3>());
m_overlay->draw(m_cacheScreen.get(), math::Identity<double, 3>());
m_cacheScreen->setDisplayList(0);
m_cacheScreen->endFrame();
@ -256,7 +256,7 @@ void ScreenCoverage::SetScreen(ScreenBase const & screen)
{
Tiler::RectInfo ri = (*it)->m_rectInfo;
tileCache->UnlockTile((*it)->m_rectInfo);
/// here we should "unmerge" erasedTiles[i].m_infoLayer from m_infoLayer
/// here we should "unmerge" erasedTiles[i].m_overlay from m_overlay
}
for (TTileSet::const_iterator it = addedTiles.begin(); it != addedTiles.end(); ++it)
@ -269,7 +269,7 @@ void ScreenCoverage::SetScreen(ScreenBase const & screen)
m_tiles = tiles;
MergeInfoLayer();
MergeOverlay();
set<Tiler::RectInfo> drawnTiles;
@ -364,9 +364,9 @@ void ScreenCoverage::Draw(yg::gl::Screen * s, ScreenBase const & screen)
m_displayList->draw(m_screen.PtoGMatrix() * screen.GtoPMatrix());
}
yg::InfoLayer * ScreenCoverage::GetInfoLayer() const
yg::Overlay * ScreenCoverage::GetOverlay() const
{
return m_infoLayer.get();
return m_overlay.get();
}
int ScreenCoverage::GetDrawScale() const
@ -427,20 +427,20 @@ void ScreenCoverage::RemoveTiles(m2::AnyRectD const & r, int startScale)
m_tileRects.erase(ri);
}
MergeInfoLayer();
MergeOverlay();
}
void ScreenCoverage::MergeInfoLayer()
void ScreenCoverage::MergeOverlay()
{
m_infoLayer->clear();
m_overlay->clear();
for (TTileSet::const_iterator it = m_tiles.begin(); it != m_tiles.end(); ++it)
{
Tiler::RectInfo const & ri = (*it)->m_rectInfo;
if (m_tiler.isLeaf(ri))
{
scoped_ptr<yg::InfoLayer> copy((*it)->m_infoLayer->clone());
m_infoLayer->merge(*copy.get(), (*it)->m_tileScreen.PtoGMatrix() * m_screen.GtoPMatrix());
scoped_ptr<yg::Overlay> copy((*it)->m_overlay->clone());
m_overlay->merge(*copy.get(), (*it)->m_tileScreen.PtoGMatrix() * m_screen.GtoPMatrix());
}
}
}

View file

@ -4,7 +4,7 @@
#include "../geometry/screenbase.hpp"
#include "../yg/info_layer.hpp"
#include "../yg/overlay.hpp"
#include "tile.hpp"
#include "tiler.hpp"
@ -51,8 +51,8 @@ private:
/// Tiles in this set are locked to prevent their deletion
/// from TileCache while drawing them
TTileSet m_tiles;
/// InfoLayer composed of infoLayers for visible tiles
scoped_ptr<yg::InfoLayer> m_infoLayer;
/// Overlay composed of overlays for visible tiles
scoped_ptr<yg::Overlay> m_overlay;
/// State flags
@ -73,8 +73,8 @@ private:
ScreenCoverage(ScreenCoverage const & src);
ScreenCoverage const & operator=(ScreenCoverage const & src);
/// For each tile in m_tiles merge it's infoLayer into the big one.
void MergeInfoLayer();
/// For each tile in m_tiles merge it's overlay into the big one.
void MergeOverlay();
public:
@ -102,8 +102,8 @@ public:
bool IsEmptyModelAtCoverageCenter() const;
/// Check, whether the model is empty at the center of the coverage.
void CheckEmptyModelAtCoverageCenter();
/// Getter for InfoLayer
yg::InfoLayer * GetInfoLayer() const;
/// Getter for Overlay
yg::Overlay * GetOverlay() const;
/// Cache coverage in display list
void Cache();
/// add rendered tile to coverage. Tile is locked, so make sure to unlock it in case it's not needed.

View file

@ -2,7 +2,7 @@
#include "events.hpp"
#include "drawer_yg.hpp"
#include "window_handle.hpp"
#include "../yg/info_layer.hpp"
#include "../yg/overlay.hpp"
#include "../yg/internal/opengl.hpp"
#include "../yg/skin.hpp"
@ -125,18 +125,18 @@ void SimpleRenderPolicy::DrawFrame(shared_ptr<PaintEvent> const & e,
pxCenter + m2::PointD(scaleEtalonSize / 2, scaleEtalonSize / 2)),
glbRect);
shared_ptr<yg::InfoLayer> infoLayer(new yg::InfoLayer());
shared_ptr<yg::Overlay> overlay(new yg::Overlay());
DrawerYG * pDrawer = e->drawer();
pDrawer->screen()->setInfoLayer(infoLayer);
pDrawer->screen()->setOverlay(overlay);
pDrawer->screen()->beginFrame();
pDrawer->screen()->clear(m_bgColor);
m_renderFn(e, s, s.ClipRect(), s.ClipRect(), scales::GetScaleLevel(glbRect), false);
infoLayer->draw(pDrawer->screen().get(), math::Identity<double, 3>());
pDrawer->screen()->resetInfoLayer();
overlay->draw(pDrawer->screen().get(), math::Identity<double, 3>());
pDrawer->screen()->resetOverlay();
pDrawer->screen()->endFrame();
}

View file

@ -8,13 +8,13 @@ Tile::Tile()
{}
Tile::Tile(shared_ptr<yg::gl::BaseTexture> const & renderTarget,
shared_ptr<yg::InfoLayer> const & infoLayer,
shared_ptr<yg::Overlay> const & overlay,
ScreenBase const & tileScreen,
Tiler::RectInfo const & rectInfo,
double duration,
bool isEmptyDrawing)
: m_renderTarget(renderTarget),
m_infoLayer(infoLayer),
m_overlay(overlay),
m_tileScreen(tileScreen),
m_rectInfo(rectInfo),
m_duration(duration),

View file

@ -12,13 +12,13 @@ namespace yg
{
class BaseTexture;
}
class InfoLayer;
class Overlay;
}
struct Tile
{
shared_ptr<yg::gl::BaseTexture> m_renderTarget; //< taken from resource manager
shared_ptr<yg::InfoLayer> m_infoLayer; //< text and POI's
shared_ptr<yg::Overlay> m_overlay; //< text and POI's
ScreenBase m_tileScreen; //< cached to calculate it once, cause tile blitting
//< is performed on GUI thread.
Tiler::RectInfo m_rectInfo; //< taken from tiler
@ -28,7 +28,7 @@ struct Tile
Tile();
Tile(shared_ptr<yg::gl::BaseTexture> const & renderTarget,
shared_ptr<yg::InfoLayer> const & infoLayer,
shared_ptr<yg::Overlay> const & overlay,
ScreenBase const & tileScreen,
Tiler::RectInfo const & rectInfo,
double duration,

View file

@ -179,10 +179,10 @@ void TileRenderer::DrawTile(core::CommandsQueue::Environment const & env,
drawer->screen()->setRenderTarget(tileTarget);
shared_ptr<yg::InfoLayer> tileInfoLayer(new yg::InfoLayer());
tileInfoLayer->setCouldOverlap(true);
shared_ptr<yg::Overlay> tileOverlay(new yg::Overlay());
tileOverlay->setCouldOverlap(true);
drawer->screen()->setInfoLayer(tileInfoLayer);
drawer->screen()->setOverlay(tileOverlay);
/// ensuring, that the render target is not bound as a texture
@ -224,11 +224,11 @@ void TileRenderer::DrawTile(core::CommandsQueue::Environment const & env,
drawer->endFrame();
drawer->screen()->resetInfoLayer();
drawer->screen()->resetOverlay();
/// filter out the overlay elements that are out of the bound rect for the tile
if (!env.isCancelled())
tileInfoLayer->clip(renderRect);
tileOverlay->clip(renderRect);
ReadPixels(glQueue, env);
drawer->screen()->finish();
@ -257,7 +257,7 @@ void TileRenderer::DrawTile(core::CommandsQueue::Environment const & env,
else
{
AddActiveTile(Tile(tileTarget,
tileInfoLayer,
tileOverlay,
frameScreen,
rectInfo,
0,

View file

@ -1,6 +1,6 @@
#include "../base/SRC_FIRST.hpp"
#include "info_layer.hpp"
#include "overlay.hpp"
#include "text_element.hpp"
#include "../base/logging.hpp"
@ -28,16 +28,16 @@ namespace yg
return elem->roughBoundRect();
}
void InfoLayer::draw(gl::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m)
void Overlay::draw(gl::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m)
{
m_tree.ForEach(bind(&OverlayElement::draw, _1, r, cref(m)));
}
InfoLayer::InfoLayer()
Overlay::Overlay()
: m_couldOverlap(true)
{}
InfoLayer::InfoLayer(InfoLayer const & src)
Overlay::Overlay(Overlay const & src)
{
m_couldOverlap = src.m_couldOverlap;
@ -57,7 +57,7 @@ namespace yg
}
}
void InfoLayer::setCouldOverlap(bool flag)
void Overlay::setCouldOverlap(bool flag)
{
m_couldOverlap = flag;
}
@ -138,17 +138,17 @@ namespace yg
}
}
void InfoLayer::offset(m2::PointD const & offs, m2::RectD const & rect)
void Overlay::offset(m2::PointD const & offs, m2::RectD const & rect)
{
offsetTree(m_tree, offs, rect);
}
void InfoLayer::clear()
void Overlay::clear()
{
m_tree.Clear();
}
void InfoLayer::addOverlayElement(shared_ptr<OverlayElement> const & oe)
void Overlay::addOverlayElement(shared_ptr<OverlayElement> const & oe)
{
m_tree.Add(oe);
}
@ -183,7 +183,7 @@ namespace yg
}
};
void InfoLayer::replaceOverlayElement(shared_ptr<OverlayElement> const & oe)
void Overlay::replaceOverlayElement(shared_ptr<OverlayElement> const & oe)
{
bool isIntersect = false;
DoPreciseIntersect fn(oe, &isIntersect);
@ -194,7 +194,7 @@ namespace yg
m_tree.Add(oe);
}
void InfoLayer::processOverlayElement(shared_ptr<OverlayElement> const & oe, math::Matrix<double, 3, 3> const & m)
void Overlay::processOverlayElement(shared_ptr<OverlayElement> const & oe, math::Matrix<double, 3, 3> const & m)
{
if (m != math::Identity<double, 3>())
processOverlayElement(make_shared_ptr(oe->clone(m)));
@ -202,7 +202,7 @@ namespace yg
processOverlayElement(oe);
}
void InfoLayer::processOverlayElement(shared_ptr<OverlayElement> const & oe)
void Overlay::processOverlayElement(shared_ptr<OverlayElement> const & oe)
{
if (oe->isVisible())
{
@ -219,7 +219,7 @@ namespace yg
return l->visualRank() > r->visualRank();
}
void InfoLayer::merge(InfoLayer const & layer, math::Matrix<double, 3, 3> const & m)
void Overlay::merge(Overlay const & layer, math::Matrix<double, 3, 3> const & m)
{
vector<shared_ptr<OverlayElement> > v;
@ -231,10 +231,10 @@ namespace yg
/// 3. merging them into the infoLayer starting from most
/// important one to optimize the space usage.
for_each(v.begin(), v.end(), bind(&InfoLayer::processOverlayElement, this, _1, cref(m)));
for_each(v.begin(), v.end(), bind(&Overlay::processOverlayElement, this, _1, cref(m)));
}
void InfoLayer::clip(m2::RectI const & r)
void Overlay::clip(m2::RectI const & r)
{
vector<shared_ptr<OverlayElement> > v;
m_tree.ForEach(MakeBackInsertFunctor(v));
@ -278,7 +278,7 @@ namespace yg
// LOG(LINFO, ("clipped out", clippedCnt, "elements,", elemCnt, "elements total"));
}
bool InfoLayer::checkHasEquals(InfoLayer const * l) const
bool Overlay::checkHasEquals(Overlay const * l) const
{
vector<shared_ptr<OverlayElement> > v0;
m_tree.ForEach(MakeBackInsertFunctor(v0));
@ -297,9 +297,9 @@ namespace yg
return !res.empty();
}
InfoLayer * InfoLayer::clone() const
Overlay * Overlay::clone() const
{
InfoLayer * res = new InfoLayer(*this);
Overlay * res = new Overlay(*this);
return res;
}
}

View file

@ -19,7 +19,7 @@ namespace yg
static m2::RectD const LimitRect(shared_ptr<OverlayElement> const & elem);
};
class InfoLayer
class Overlay
{
private:
@ -32,8 +32,8 @@ namespace yg
public:
InfoLayer();
InfoLayer(InfoLayer const & src);
Overlay();
Overlay(Overlay const & src);
void draw(gl::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m);
@ -47,12 +47,12 @@ namespace yg
void setCouldOverlap(bool flag);
void merge(InfoLayer const & infoLayer, math::Matrix<double, 3, 3> const & m);
void merge(Overlay const & infoLayer, math::Matrix<double, 3, 3> const & m);
void clip(m2::RectI const & r);
bool checkHasEquals(InfoLayer const * l) const;
bool checkHasEquals(Overlay const * l) const;
InfoLayer * clone() const;
Overlay * clone() const;
};
}

View file

@ -7,7 +7,7 @@
#include "symbol_element.hpp"
#include "circle_element.hpp"
#include "render_state.hpp"
#include "info_layer.hpp"
#include "overlay.hpp"
#include "resource_manager.hpp"
#include "skin.hpp"
@ -25,7 +25,7 @@ namespace yg
: TextRenderer(p),
m_drawTexts(p.m_drawTexts),
m_drawSymbols(p.m_drawSymbols),
m_infoLayer(p.m_infoLayer)
m_overlay(p.m_overlay)
{
}
@ -48,10 +48,10 @@ namespace yg
math::Matrix<double, 3, 3> id = math::Identity<double, 3>();
if (!m_infoLayer.get())
if (!m_overlay.get())
oe->draw(this, id);
else
m_infoLayer->processOverlayElement(oe);
m_overlay->processOverlayElement(oe);
}
void OverlayRenderer::drawCircle(m2::PointD const & pt,
@ -70,10 +70,10 @@ namespace yg
math::Matrix<double, 3, 3> id = math::Identity<double, 3>();
if (!m_infoLayer.get())
if (!m_overlay.get())
oe->draw(this, id);
else
m_infoLayer->processOverlayElement(oe);
m_overlay->processOverlayElement(oe);
}
void OverlayRenderer::drawText(FontDesc const & fontDesc,
@ -102,10 +102,10 @@ namespace yg
math::Matrix<double, 3, 3> id = math::Identity<double, 3>();
if (!m_infoLayer.get())
if (!m_overlay.get())
oe->draw(this, id);
else
m_infoLayer->processOverlayElement(oe);
m_overlay->processOverlayElement(oe);
}
void OverlayRenderer::drawTextEx(FontDesc const & primaryFont,
@ -138,10 +138,10 @@ namespace yg
math::Matrix<double, 3, 3> id = math::Identity<double, 3>();
if (!m_infoLayer.get())
if (!m_overlay.get())
oe->draw(this, id);
else
m_infoLayer->processOverlayElement(oe);
m_overlay->processOverlayElement(oe);
}
bool OverlayRenderer::drawPathText(
@ -169,27 +169,27 @@ namespace yg
math::Matrix<double, 3, 3> id = math::Identity<double, 3>();
if (!m_infoLayer.get())
if (!m_overlay.get())
pte->draw(this, id);
else
m_infoLayer->processOverlayElement(pte);
m_overlay->processOverlayElement(pte);
return true;
}
void OverlayRenderer::setInfoLayer(shared_ptr<InfoLayer> const & infoLayer)
void OverlayRenderer::setOverlay(shared_ptr<Overlay> const & overlay)
{
m_infoLayer = infoLayer;
m_overlay = overlay;
}
shared_ptr<InfoLayer> const & OverlayRenderer::infoLayer() const
shared_ptr<Overlay> const & OverlayRenderer::overlay() const
{
return m_infoLayer;
return m_overlay;
}
void OverlayRenderer::resetInfoLayer()
void OverlayRenderer::resetOverlay()
{
m_infoLayer.reset();
m_overlay.reset();
}
}
}

View file

@ -2,7 +2,7 @@
#include "text_renderer.hpp"
#include "../std/shared_ptr.hpp"
#include "info_layer.hpp"
#include "overlay.hpp"
namespace yg
{
@ -14,7 +14,7 @@ namespace yg
bool m_drawTexts;
bool m_drawSymbols;
shared_ptr<yg::InfoLayer> m_infoLayer;
shared_ptr<yg::Overlay> m_overlay;
typedef map<m2::PointI, shared_ptr<OverlayElement> > TElements;
@ -26,7 +26,7 @@ namespace yg
{
bool m_drawTexts;
bool m_drawSymbols;
shared_ptr<yg::InfoLayer> m_infoLayer;
shared_ptr<yg::Overlay> m_overlay;
Params();
};
@ -67,11 +67,11 @@ namespace yg
yg::EPosition pos,
double depth);
void setInfoLayer(shared_ptr<InfoLayer> const & infoLayer);
void setOverlay(shared_ptr<Overlay> const & overlay);
shared_ptr<InfoLayer> const & infoLayer() const;
shared_ptr<Overlay> const & overlay() const;
void resetInfoLayer();
void resetOverlay();
};
}
}

View file

@ -3,16 +3,16 @@
#include "render_state.hpp"
#include "renderbuffer.hpp"
#include "info_layer.hpp"
#include "overlay.hpp"
namespace yg
{
namespace gl
{
RenderState::RenderState()
: m_actualInfoLayer(new yg::InfoLayer()),
: m_actualOverlay(new yg::Overlay()),
m_isEmptyModelActual(false),
m_currentInfoLayer(new yg::InfoLayer()),
m_currentOverlay(new yg::Overlay()),
m_isEmptyModelCurrent(false),
m_isResized(false),
m_doRepaintAll(false),

View file

@ -10,7 +10,7 @@
namespace yg
{
class InfoLayer;
class Overlay;
namespace gl
{
@ -28,7 +28,7 @@ namespace yg
/// Bitmap
shared_ptr<BaseTexture> m_actualTarget;
/// Information layer
shared_ptr<yg::InfoLayer> m_actualInfoLayer;
shared_ptr<yg::Overlay> m_actualOverlay;
/// Screen parameters
ScreenBase m_actualScreen;
/// Empty-model flag of the actual target
@ -40,7 +40,7 @@ namespace yg
/// Screen of the rendering operation in progress.
ScreenBase m_currentScreen;
/// information layer
shared_ptr<yg::InfoLayer> m_currentInfoLayer;
shared_ptr<yg::Overlay> m_currentOverlay;
/// at least one backBuffer layer
shared_ptr<BaseTexture> m_backBuffer;
/// depth buffer used for rendering

View file

@ -1,6 +1,6 @@
#include "text_renderer.hpp"
#include "render_state.hpp"
#include "info_layer.hpp"
#include "overlay.hpp"
#include "resource_style.hpp"
#include "resource_manager.hpp"

View file

@ -47,7 +47,7 @@ SOURCES += \
glyph_layout.cpp \
text_element.cpp \
text_path.cpp \
info_layer.cpp \
overlay.cpp \
overlay_element.cpp \
symbol_element.cpp \
overlay_renderer.cpp \
@ -105,7 +105,7 @@ HEADERS += \
glyph_layout.hpp \
text_element.hpp \
text_path.hpp \
info_layer.hpp \
overlay.hpp \
overlay_element.hpp \
symbol_element.hpp \
overlay_renderer.hpp \

View file

@ -1131,8 +1131,8 @@ namespace
public:
void DoDraw(shared_ptr<yg::gl::Screen> p)
{
p->setInfoLayer(make_shared_ptr(new yg::InfoLayer()));
p->infoLayer()->setCouldOverlap(false);
p->setOverlay(make_shared_ptr(new yg::Overlay()));
p->overlay()->setCouldOverlap(false);
p->drawSymbol(m2::PointD(200, 200), "current-position", yg::EPosUnder, yg::maxDepth);
p->drawText(yg::FontDesc(), m2::PointD(200, 200), yg::EPosAbove, "Test Text", yg::maxDepth, true);
@ -1143,8 +1143,8 @@ namespace
p->endFrame();
p->beginFrame();
p->infoLayer()->draw(p.get(), math::Identity<double, 3>());
p->resetInfoLayer();
p->overlay()->draw(p.get(), math::Identity<double, 3>());
p->resetOverlay();
}
};