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

This commit is contained in:
rachytski 2012-08-07 11:30:56 +03:00 committed by Alex Zolotarev
parent 42fc886062
commit bc3bee8676
8 changed files with 6 additions and 22 deletions

View file

@ -162,6 +162,11 @@ 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 = 0;
virtual int visualRank() const;
m2::PointD const & pivot() const;
virtual void setPivot(m2::PointD const & pv);

View file

@ -83,11 +83,6 @@ 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,8 +27,6 @@ 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,11 +293,6 @@ 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,8 +33,6 @@ 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,11 +85,6 @@ 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,8 +37,6 @@ namespace yg
uint32_t styleID() const;
int visualRank() const;
OverlayElement * clone(math::Matrix<double, 3, 3> const & m) const;
};
}