RadialGradient.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <esvg/Base.hpp>
9 #include <esvg/gradientUnits.hpp>
10 #include <esvg/spreadMethod.hpp>
11 
12 namespace esvg {
13  class Document;
14  class RadialGradient : public esvg::Base {
15  private:
16  esvg::Dimension m_center;
17  esvg::Dimension1D m_radius;
18  esvg::Dimension m_focal;
19  public:
20  enum gradientUnits m_unit;
21  enum spreadMethod m_spread;
22  private:
23  std::string m_href;
24  std::vector<std::pair<float, etk::Color<float,4>>> m_data;
25  public:
26  RadialGradient(PaintState _parentPaintState);
27  ~RadialGradient();
28  virtual bool parseXML(const exml::Element& _element, mat2& _parentTrans, vec2& _sizeMax);
29  virtual void display(int32_t _spacing);
30  virtual void draw(esvg::Renderer& _myRenderer, mat2& _basicTrans, int32_t _level);
31  public:
32  const esvg::Dimension& getCenter();
33  const esvg::Dimension& getFocal();
34  const esvg::Dimension1D& getRadius();
35  const std::vector<std::pair<float, etk::Color<float,4>>>& getColors(esvg::Document* _document);
36  };
37 }
38 
Main esvg namespace.
Definition: Base.hpp:24
virtual bool parseXML(const exml::Element &_element, mat2 &_parentTrans, vec2 &_sizeMax)
parse all the element needed in the basic node
Definition: Base.hpp:52
Definition: Renderer.hpp:16
Definition: Base.hpp:36
in the dimention class we store the data as the more usefull unit (pixel) but one case need to be dyn...
Definition: Dimension.hpp:30
Definition: esvg.hpp:19
in the dimention class we store the data as the more usefull unit (pixel) but one case need to be dyn...
Definition: Dimension.hpp:151
virtual void draw(esvg::Renderer &_myRenderer, mat2 &_basicTrans, int32_t _level)
Draw the form in the renderer.
Definition: RadialGradient.hpp:14