Path.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <etk/types.hpp>
9 #include <etk/math/Vector2D.hpp>
10 #include <esvg/render/Element.hpp>
12 #include <ememory/memory.hpp>
13 #ifdef DEBUG
15 #endif
16 
17 namespace esvg {
18  namespace render {
19  class Path {
20  public:
21  std::vector<ememory::SharedPtr<esvg::render::Element>> m_listElement;
22  #ifdef DEBUG
23  esvg::render::SegmentList m_debugInformation;
24  #endif
25  public:
26  Path() {
27 
28  }
29 
30  ~Path() {
31 
32  }
33  void clear();
34  void stop();
35  void close(bool _relative=false);
36  void moveTo(bool _relative, const vec2& _pos);
37  void lineTo(bool _relative, const vec2& _pos);
38  void lineToH(bool _relative, float _posX);
39  void lineToV(bool _relative, float _posY);
40  void curveTo(bool _relative, const vec2& _pos1, const vec2& _pos2, const vec2& _pos);
41  void smoothCurveTo(bool _relative, const vec2& _pos2, const vec2& _pos);
42  void bezierCurveTo(bool _relative, const vec2& _pos1, const vec2& _pos);
43  void bezierSmoothCurveTo(bool _relative, const vec2& _pos);
44  void ellipticTo(bool _relative,
45  const vec2& _radius,
46  float _angle,
47  bool _largeArcFlag,
48  bool _sweepFlag,
49  const vec2& _pos);
50  void display(int32_t _spacing);
51  esvg::render::PointList generateListPoints(int32_t _level, int32_t _recurtionMax = 10, float _threshold = 0.25f);
52  };
53  }
54 }
55 
Definition: Path.hpp:19
Main esvg namespace.
Definition: Base.hpp:24
Definition: PointList.hpp:16
Definition: SegmentList.hpp:17