Weight.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/Scanline.hpp>
12 
13 namespace esvg {
14  namespace render {
15  class Weight {
16  private:
17  ivec2 m_size;
18  std::vector<float> m_data;
19  public:
20  // constructor :
21  Weight();
22  Weight(const ivec2& _size);
23  // destructor
24  ~Weight();
25  // -----------------------------------------------
26  // -- basic tools :
27  // -----------------------------------------------
28  public:
29  void resize(const ivec2& _size);
30  const ivec2& getSize() const;
31  int32_t getWidth() const;
32  int32_t getHeight() const;
33  void clear(float _fill);
34  float get(const ivec2& _pos) const;
35  void set(const ivec2& _pos, float _newColor);
36  void set(int32_t _posY, const esvg::render::Scanline& _data);
37  void append(int32_t _posY, const esvg::render::Scanline& _data);
38  void generate(ivec2 _size, int32_t _subSamplingCount, const esvg::render::SegmentList& _listSegment);
39  };
40  }
41 }
42 
Main esvg namespace.
Definition: Base.hpp:24
Definition: Weight.hpp:15
Definition: SegmentList.hpp:17
Definition: Scanline.hpp:13