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

text_element.hpp « graphics - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a54bc1e7386bddbd1c8204cf14992eb9f2d219fd (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
40
41
42
43
44
45
46
47
48
49
#pragma once
#include "graphics/overlay_element.hpp"
#include "graphics/font_desc.hpp"

#include "base/matrix.hpp"
#include "base/string_utils.hpp"


namespace graphics
{
  class GlyphLayout;
  class GlyphCache;
  class OverlayRenderer;

  class TextElement : public OverlayElement
  {
  protected:
    FontDesc m_fontDesc, m_auxFontDesc;

  public:
    struct Params : OverlayElement::Params
    {
      FontDesc m_fontDesc;
      strings::UniString m_logText;

      FontDesc m_auxFontDesc;
      strings::UniString m_auxLogText;

      bool m_log2vis;
      GlyphCache * m_glyphCache;

      pair<bool, bool> GetVisibleTexts(strings::UniString & visText,
                                       strings::UniString & auxVisText) const;
    };

    TextElement(Params const & p);

    void drawTextImpl(GlyphLayout const & layout,
                      OverlayRenderer * r,
                      math::Matrix<double, 3, 3> const & m,
                      bool doTransformPivotOnly,
                      bool doAlignPivot,
                      FontDesc const & desc,
                      double depth) const;

    FontDesc const & fontDesc() const;
    FontDesc const & auxFontDesc() const;
  };
}