Inheritance diagram for esvg::Base:
esvg::Circle esvg::Document esvg::Ellipse esvg::Group esvg::Line esvg::LinearGradient esvg::Path esvg::Polygon esvg::Polyline esvg::RadialGradient esvg::Rectangle esvg::Text

Public Member Functions

 Base (PaintState _parentPaintState)
 
virtual bool parseXML (const exml::Element &_element, mat2 &_parentTrans, vec2 &_sizeMax)
 
virtual void draw (esvg::Renderer &_myRenderer, mat2 &_basicTrans, int32_t _level=1)
 
virtual void drawShapePoints (std::vector< std::vector< vec2 >> &_out, int32_t _recurtionMax, float _threshold, mat2 &_basicTrans, int32_t _level=1)
 
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::distanceparseLength2 (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

const char * spacingDist (int32_t _spacing)
 

Protected Attributes

PaintState m_paint
 
mat2 m_transformMatrix
 
std::string m_id
 

Member Function Documentation

§ draw()

virtual void esvg::Base::draw ( esvg::Renderer _myRenderer,
mat2 _basicTrans,
int32_t  _level = 1 
)
virtual

Draw the form in the renderer.

Parameters
[in]_myRendererRenderer engine
[in]_basicTransParant transformation of the environement
[in]_levelLevel of the tree

Reimplemented in esvg::Document, esvg::RadialGradient, esvg::LinearGradient, esvg::Polygon, esvg::Rectangle, esvg::Circle, esvg::Ellipse, esvg::Group, esvg::Line, esvg::Path, and esvg::Polyline.

§ drawShapePoints()

virtual void esvg::Base::drawShapePoints ( std::vector< std::vector< vec2 >> &  _out,
int32_t  _recurtionMax,
float  _threshold,
mat2 _basicTrans,
int32_t  _level = 1 
)
virtual

Draw rhe shape with all points.

Parameters
[in]_outwhere the lines are added
[in]_recurtionMaxinterpolation recurtion max
[in]_thresholdthreshold to stop recurtion
[in]_basicTransParant transformation of the environement
[in]_levelLevel of the tree

Reimplemented in esvg::Document, esvg::Polygon, esvg::Rectangle, esvg::Circle, esvg::Ellipse, esvg::Group, esvg::Line, esvg::Path, and esvg::Polyline.

§ getId()

const std::string& esvg::Base::getId ( ) const

Get the ID of the Element.

Returns
UniqueId in the svg file

§ parseColor()

std::pair<etk::Color<float,4>, std::string> esvg::Base::parseColor ( const std::string &  _inputData)

parse a color specification from the svg file

Parameters
[in]_inputDataData C String with the xml definition
Returns
The parsed color (color used and the link if needed)

§ parseLength()

float esvg::Base::parseLength ( const std::string &  _dataInput)

parse a lenght of the xml element

Parameters
[in]_dataInputData C String with the printed lenght
Returns
standard number of pixels

§ parsePaintAttr()

void esvg::Base::parsePaintAttr ( const exml::Element _element)

parse a Painting attribute of a specific node

Parameters
[in]_elementBasic node of the XML that might be parsed

§ parsePosition()

void esvg::Base::parsePosition ( const exml::Element _element,
vec2 _pos,
vec2 _size 
)

parse x, y, width, height attribute of the xml node

Parameters
[in]_elementXML node
[out]_posparsed position
[out]_sizeparsed dimention

§ parseXML()

virtual bool esvg::Base::parseXML ( const exml::Element _element,
mat2 _parentTrans,
vec2 _sizeMax 
)
virtual

parse all the element needed in the basic node

Parameters
[in]_elementstandart XML node
Returns
true if no problem arrived

Reimplemented in esvg::RadialGradient, esvg::LinearGradient, esvg::Polygon, esvg::Rectangle, esvg::Circle, esvg::Ellipse, esvg::Group, esvg::Line, esvg::Path, and esvg::Polyline.

§ setId()

void esvg::Base::setId ( const std::string &  _newId)

Set the ID of the Element.

Parameters
[in]_newIdNew Id of the element

Member Data Documentation

§ m_id

std::string esvg::Base::m_id
protected

unique ID of the element.

§ m_transformMatrix

mat2 esvg::Base::m_transformMatrix
protected

specific render of the curent element


The documentation for this class was generated from the following file:
  • framework/atria-soft/esvg/esvg/Base.hpp