Point.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>
11 
12 namespace esvg {
13  namespace render {
14  class Point {
15  public:
16  enum class type {
17  single,
18  start,
19  stop,
20  join,
22  };
23  public:
24  // TODO : Clean all element here ...
26  enum esvg::render::Point::type m_type;
27  vec2 m_miterAxe;
28  vec2 m_orthoAxePrevious;
29  vec2 m_orthoAxeNext;
30  vec2 m_posPrevious;
31  vec2 m_posNext;
32  vec2 m_delta;
33  float m_len;
35  m_pos(_pos),
36  m_type(_type) {
37  // nothing to do ...
38  }
39  void setEndPath();
40  void normalize(const vec2& _nextPoint);
41  };
42  }
43 }
44 
Main esvg namespace.
Definition: Base.hpp:24
Point type in an user point provided inside a path.
This point is dynamicly calculated to create an interpolation.
type
Definition: Point.hpp:16
Point type is single, this mean that it start and stop of a path.
Definition: Point.hpp:14
vec2 m_pos
position of the point
Definition: Point.hpp:25
Point type is stoping of a path.
Point type is starting of a path.