Rectangle.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <esvg/Base.hpp>
9 
10 namespace esvg {
11  class Rectangle : public esvg::Base {
12  private:
13  vec2 m_position;
14  vec2 m_size;
15  vec2 m_roundedCorner;
16  public:
17  Rectangle(PaintState _parentPaintState);
18  ~Rectangle();
19  bool parseXML(const exml::Element& _element, mat2& _parentTrans, vec2& _sizeMax) override;
20  void display(int32_t _spacing) override;
21  void draw(esvg::Renderer& _myRenderer, mat2& _basicTrans, int32_t _level) override;
22  void drawShapePoints(std::vector<std::vector<vec2>>& _out,
23  int32_t _recurtionMax,
24  float _threshold,
25  mat2& _basicTrans,
26  int32_t _level=1) override;
27  private:
28  esvg::render::Path createPath();
29  };
30 }
31 
Definition: Path.hpp:19
Main esvg namespace.
Definition: Base.hpp:24
void drawShapePoints(std::vector< std::vector< vec2 >> &_out, int32_t _recurtionMax, float _threshold, mat2 &_basicTrans, int32_t _level=1) override
Draw rhe shape with all points.
Definition: Base.hpp:52
Definition: Renderer.hpp:16
void draw(esvg::Renderer &_myRenderer, mat2 &_basicTrans, int32_t _level) override
Draw the form in the renderer.
Definition: Base.hpp:36
Definition: Rectangle.hpp:11
bool parseXML(const exml::Element &_element, mat2 &_parentTrans, vec2 &_sizeMax) override
parse all the element needed in the basic node