Revert "using OverlayElement::depth as a visualPriority for elements filtering in Overlay."

Needed to publish updates, will be reverted back.

This reverts commit b916cd228af5fdadc2efa5d9e6509112ba7e5d84.
This commit is contained in:
Alex Zolotarev 2012-08-13 20:50:43 +03:00 committed by Alex Zolotarev
parent 1714aaf962
commit c45922cd87
8 changed files with 22 additions and 6 deletions

View file

@ -162,11 +162,6 @@ namespace yg
return false;
}
int OverlayElement::visualRank() const
{
return depth();
}
bool OverlayElement::isValid() const
{
return m_isValid;

View file

@ -51,7 +51,7 @@ namespace yg
/// PLEASE, REMEMBER THE REFERENCE!!!
virtual vector<m2::AnyRectD> const & boundRects() const = 0;
virtual void draw(gl::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m) const = 0;
virtual int visualRank() const;
virtual int visualRank() const = 0;
m2::PointD const & pivot() const;
virtual void setPivot(m2::PointD const & pv);

View file

@ -83,6 +83,11 @@ namespace yg
m_glyphLayout.setPivot(pivot);
}
int PathTextElement::visualRank() const
{
return 2000 + m_fontDesc.m_size;
}
OverlayElement * PathTextElement::clone(math::Matrix<double, 3, 3> const & m) const
{
return new PathTextElement(*this, m);

View file

@ -27,6 +27,8 @@ namespace yg
void draw(gl::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m) const;
int visualRank() const;
void setPivot(m2::PointD const & pivot);
OverlayElement * clone(math::Matrix<double, 3, 3> const & m) const;

View file

@ -293,6 +293,11 @@ namespace yg
m_glyphLayouts[i].setPivot(m_glyphLayouts[i].pivot() + offs);
}
int StraightTextElement::visualRank() const
{
return 1000 + m_fontDesc.m_size;
}
OverlayElement * StraightTextElement::clone(math::Matrix<double, 3, 3> const & m) const
{
return new StraightTextElement(*this, m);

View file

@ -33,6 +33,8 @@ namespace yg
void draw(gl::OverlayRenderer * r, math::Matrix<double, 3, 3> const & m) const;
int visualRank() const;
void setPivot(m2::PointD const & pv);
OverlayElement * clone(math::Matrix<double, 3, 3> const & m) const;

View file

@ -85,6 +85,11 @@ namespace yg
style->m_pipelineID);
}
int SymbolElement::visualRank() const
{
return 0000;
}
OverlayElement * SymbolElement::clone(math::Matrix<double, 3, 3> const & m) const
{
return new SymbolElement(*this, m);

View file

@ -37,6 +37,8 @@ namespace yg
uint32_t styleID() const;
int visualRank() const;
OverlayElement * clone(math::Matrix<double, 3, 3> const & m) const;
};
}