blob: d3ac8ef85c32e7d1baba8a5e16fec3708e8d48a9 (
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
50
51
52
53
54
|
#pragma once
#include "drape_frontend/user_marks_provider.hpp"
#include "drape/color.hpp"
#include "geometry/polyline2d.hpp"
#include "base/buffer_vector.hpp"
#include "base/macros.hpp"
namespace location
{
class RouteMatchingInfo;
}
class Track : public df::UserLineMark
{
DISALLOW_COPY_AND_MOVE(Track);
public:
using PolylineD = m2::PolylineD;
struct TrackOutline
{
float m_lineWidth;
dp::Color m_color;
};
struct Params
{
buffer_vector<TrackOutline, 2> m_colors;
string m_name;
};
explicit Track(PolylineD const & polyline, Params const & p);
string const & GetName() const;
PolylineD const & GetPolyline() const { return m_polyline; }
m2::RectD GetLimitRect() const;
double GetLengthMeters() const;
size_t GetLayerCount() const override;
dp::Color const & GetColor(size_t layerIndex) const override;
float GetWidth(size_t layerIndex) const override;
float GetLayerDepth(size_t layerIndex) const override;
/// Line geometry enumeration
size_t GetPointCount() const override;
m2::PointD const & GetPoint(size_t pointIndex) const override;
private:
PolylineD m_polyline;
Params m_params;
};
|