Welcome to mirror list, hosted at ThFree Co, Russian Federation.

path_text_element.hpp « graphics - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: de7625757e537b1888a2f88a597bdd2674af3349 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once

#include "graphics/text_element.hpp"
#include "graphics/glyph_layout.hpp"


namespace graphics
{
  class PathTextElement : public TextElement
  {
    typedef TextElement BaseT;

    GlyphLayoutPath m_glyphLayout;

    /// Cached bound rect for the fast Overlay tree routine.
    mutable m2::RectD m_boundRect;

  public:
    struct Params : BaseT::Params
    {
      m2::PointD const * m_pts;
      size_t m_ptsCount;
      double m_fullLength;
      double m_pathOffset;
      double m_textOffset;
      Params();
    };

    PathTextElement(Params const & p);

    virtual m2::RectD GetBoundRect() const;
    virtual void GetMiniBoundRects(RectsT & rects) const;

    void draw(OverlayRenderer * r, math::Matrix<double, 3, 3> const & m) const;

    void setPivot(m2::PointD const & pivot, bool dirtyFlag = true);
    void setTransformation(const math::Matrix<double, 3, 3> & m);
  };
}