esvg::Document Class Reference
  
Inheritance diagram for esvg::Document:
 
  
 | Public Member Functions | |
| void | clear () | 
| bool | parse (const std::string &_data) | 
| bool | generate (std::string &_data) | 
| bool | load (const std::string &_file) | 
| bool | store (const std::string &_file) | 
| bool | isLoadOk () | 
| void | displayDebug () | 
| void | generateAnImage (const std::string &_fileName, bool _visualDebug=false) | 
| void | generateAnImage (const ivec2 &_size, const std::string &_fileName, bool _visualDebug=false) | 
| std::vector< etk::Color< float, 4 > > | renderImageFloatRGBA (ivec2 &_size) | 
| std::vector< etk::Color< float, 3 > > | renderImageFloatRGB (ivec2 &_size) | 
| std::vector< etk::Color< uint8_t, 4 > > | renderImageU8RGBA (ivec2 &_size) | 
| std::vector< etk::Color< uint8_t, 3 > > | renderImageU8RGB (ivec2 &_size) | 
| std::vector< std::vector< vec2 > > | getLines (vec2 _size=vec2(256, 256)) | 
| vec2 | getDefinedSize () | 
| ememory::SharedPtr< esvg::Base > | getReference (const std::string &_name) | 
|  Public Member Functions inherited from esvg::Base | |
| Base (PaintState _parentPaintState) | |
| virtual bool | parseXML (const exml::Element &_element, mat2 &_parentTrans, vec2 &_sizeMax) | 
| virtual void | display (int32_t _spacing) | 
| void | parseTransform (const exml::Element &_element) | 
| void | parsePosition (const exml::Element &_element, vec2 &_pos, vec2 &_size) | 
| float | parseLength (const std::string &_dataInput) | 
| std::pair< float, enum esvg::distance > | parseLength2 (const std::string &_dataInput) | 
| void | parsePaintAttr (const exml::Element &_element) | 
| std::pair< etk::Color< float, 4 >, std::string > | parseColor (const std::string &_inputData) | 
| const std::string & | getId () const | 
| void | setId (const std::string &_newId) | 
| Protected Member Functions | |
| virtual bool | cleanStyleProperty (const exml::Element &_root) | 
| virtual bool | parseXMLData (const exml::Element &_root, bool _isReference=false) | 
| void | draw (esvg::Renderer &_myRenderer, mat2 &_basicTrans, int32_t _level=0) override | 
| void | drawShapePoints (std::vector< std::vector< vec2 >> &_out, int32_t _recurtionMax, float _threshold, mat2 &_basicTrans, int32_t _level=1) override | 
|  Protected Member Functions inherited from esvg::Base | |
| const char * | spacingDist (int32_t _spacing) | 
| Additional Inherited Members | |
|  Protected Attributes inherited from esvg::Base | |
| PaintState | m_paint | 
| mat2 | m_transformMatrix | 
| std::string | m_id | 
Member Function Documentation
§ cleanStyleProperty()
| 
 | protectedvirtual | 
change all style in a xml atribute
§ displayDebug()
| void esvg::Document::displayDebug | ( | ) | 
Display all the node in the svg file.
§ draw()
| 
 | overrideprotectedvirtual | 
Draw the form in the renderer.
- Parameters
- 
  [in] _myRenderer Renderer engine [in] _basicTrans Parant transformation of the environement [in] _level Level of the tree 
Reimplemented from esvg::Base.
§ drawShapePoints()
| 
 | overrideprotectedvirtual | 
Draw rhe shape with all points.
- Parameters
- 
  [in] _out where the lines are added [in] _recurtionMax interpolation recurtion max [in] _threshold threshold to stop recurtion [in] _basicTrans Parant transformation of the environement [in] _level Level of the tree 
Reimplemented from esvg::Base.
§ generate()
| bool esvg::Document::generate | ( | std::string & | _data | ) | 
generate a string that contain the created SVG
- Parameters
- 
  [out] _data Data where the svg is stored 
- Returns
- false : An error occured
- true : Parsing is OK
§ load()
| bool esvg::Document::load | ( | const std::string & | _file | ) | 
Load the file that might contain the svg.
- Parameters
- 
  [in] _file Filename of the svg (compatible with etk FSNode naming) 
- Returns
- false : An error occured
- true : Parsing is OK
§ parse()
| bool esvg::Document::parse | ( | const std::string & | _data | ) | 
parse a string that contain an svg stream
- Parameters
- 
  [in] _data Data to parse 
- Returns
- false : An error occured
- true : Parsing is OK
§ renderImageFloatRGB()
| std::vector<etk::Color<float,3> > esvg::Document::renderImageFloatRGB | ( | ivec2 & | _size | ) | 
§ renderImageFloatRGBA()
| std::vector<etk::Color<float,4> > esvg::Document::renderImageFloatRGBA | ( | ivec2 & | _size | ) | 
Generate Image in a specific format.
- Parameters
- 
  [in,out] _size Size expected of the rendered image (value <=0 if it need to be automatic.) return the size generate 
- Returns
- Vector of the data used to display (simple vector: generic to transmit)
§ renderImageU8RGB()
| std::vector<etk::Color<uint8_t,3> > esvg::Document::renderImageU8RGB | ( | ivec2 & | _size | ) | 
§ renderImageU8RGBA()
| std::vector<etk::Color<uint8_t,4> > esvg::Document::renderImageU8RGBA | ( | ivec2 & | _size | ) | 
§ store()
| bool esvg::Document::store | ( | const std::string & | _file | ) | 
Store the SVG in the file.
- Parameters
- 
  [in] _file Filename of the svg (compatible with etk FSNode naming) 
- Returns
- false : An error occured
- true : Parsing is OK
The documentation for this class was generated from the following file:
- framework/atria-soft/esvg/esvg/esvg.hpp
 1.8.12
 1.8.12