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

text_path.hpp « graphics - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e2bd1c48e5bc8e632d9db9bedeb0d87bdb59b9fd (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
#pragma once

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

#include "glyph_cache.hpp"
#include "path_view.hpp"

namespace graphics
{
  class TextPath
  {
  private:

    buffer_vector<m2::PointD, 8> m_arr;
    PathView m_pv;

    double m_fullLength;
    double m_pathOffset;

    void checkReverse();

  public:

    TextPath();
    TextPath(TextPath const & src, math::Matrix<double, 3, 3> const & m);
    TextPath(m2::PointD const * arr, size_t sz, double fullLength, double pathOffset);

    size_t size() const;

    m2::PointD get(size_t i) const;
    m2::PointD operator[](size_t i) const;

    double fullLength() const;
    double pathOffset() const;

    void setIsReverse(bool flag);
    bool isReverse() const;

    PathPoint const offsetPoint(PathPoint const & pp, double offset) const;
    PivotPoint findPivotPoint(PathPoint const & pp, GlyphMetrics const & sym) const;

    PathPoint const front() const;
  };
}