diff --git a/parserSVG/Base.cpp b/parserSVG/Base.cpp index b0cb336..ff76c1a 100644 --- a/parserSVG/Base.cpp +++ b/parserSVG/Base.cpp @@ -109,7 +109,7 @@ void svg::Base::ParseTransform(TiXmlNode *node) * @param[out] size parsed dimention * @return --- */ -void svg::Base::ParsePosition(const TiXmlNode *node, Vector2D &pos, Vector2D &size) +void svg::Base::ParsePosition(const TiXmlNode *node, etk::Vector2D &pos, etk::Vector2D &size) { pos.x = 0; pos.y = 0; @@ -435,7 +435,7 @@ draw::Color svg::Base::ParseColor(const char *inputData) * @param[in] node standart XML node * @return true if no problem arrived */ -bool svg::Base::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax) +bool svg::Base::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax) { SVG_ERROR("NOT IMPLEMENTED"); sizeMax.x = 0; diff --git a/parserSVG/Base.h b/parserSVG/Base.h index f03e41d..b78c3d9 100644 --- a/parserSVG/Base.h +++ b/parserSVG/Base.h @@ -55,13 +55,13 @@ namespace svg Base(void) {}; Base(PaintState parentPaintState); virtual ~Base(void) { }; - virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax); + virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax); //specific drawing for AAG librairy ... virtual void AggDraw(svg::Renderer& myRenderer, agg::trans_affine& basicTrans) { }; virtual void Display(int32_t spacing) { }; void ParseTransform(TiXmlNode *node); - void ParsePosition(const TiXmlNode *node, Vector2D &pos, Vector2D &size); + void ParsePosition(const TiXmlNode *node, etk::Vector2D &pos, etk::Vector2D &size); float ParseLength(const char *dataInput); void ParsePaintAttr(const TiXmlNode *node); draw::Color ParseColor(const char *inputData); diff --git a/parserSVG/Circle.cpp b/parserSVG/Circle.cpp index aa7e074..80c9cc8 100644 --- a/parserSVG/Circle.cpp +++ b/parserSVG/Circle.cpp @@ -38,7 +38,7 @@ svg::Circle::~Circle(void) } -bool svg::Circle::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax) +bool svg::Circle::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax) { m_radius = 0.0; m_position.x = 0.0; diff --git a/parserSVG/Circle.h b/parserSVG/Circle.h index 6470320..c4823ec 100644 --- a/parserSVG/Circle.h +++ b/parserSVG/Circle.h @@ -32,12 +32,12 @@ namespace svg class Circle : public svg::Base { private: - Vector2D m_position; //!< Position of the Circle + etk::Vector2D m_position; //!< Position of the Circle float m_radius; //!< Radius of the Circle public: Circle(PaintState parentPaintState); ~Circle(void); - virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax); + virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax); virtual void Display(int32_t spacing); virtual void AggDraw(svg::Renderer& myRenderer, agg::trans_affine& basicTrans); }; diff --git a/parserSVG/Ellipse.cpp b/parserSVG/Ellipse.cpp index d6a9d8a..1dd9506 100644 --- a/parserSVG/Ellipse.cpp +++ b/parserSVG/Ellipse.cpp @@ -37,7 +37,7 @@ svg::Ellipse::~Ellipse(void) } -bool svg::Ellipse::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax) +bool svg::Ellipse::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax) { ParseTransform(node); ParsePaintAttr(node); diff --git a/parserSVG/Ellipse.h b/parserSVG/Ellipse.h index 7c49bb0..f005187 100644 --- a/parserSVG/Ellipse.h +++ b/parserSVG/Ellipse.h @@ -32,12 +32,12 @@ namespace svg class Ellipse : public svg::Base { private: - Vector2D m_c; //!< Center property of the ellipse - Vector2D m_r; //!< Radius property of the ellipse + etk::Vector2D m_c; //!< Center property of the ellipse + etk::Vector2D m_r; //!< Radius property of the ellipse public: Ellipse(PaintState parentPaintState); ~Ellipse(void); - virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax); + virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax); virtual void Display(int32_t spacing); virtual void AggDraw(svg::Renderer& myRenderer, agg::trans_affine& basicTrans); }; diff --git a/parserSVG/Group.cpp b/parserSVG/Group.cpp index f6f0605..cfe709a 100644 --- a/parserSVG/Group.cpp +++ b/parserSVG/Group.cpp @@ -46,11 +46,11 @@ svg::Group::~Group(void) } -bool svg::Group::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax) +bool svg::Group::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax) { // parse ... - Vector2D pos; - Vector2D size; + etk::Vector2D pos; + etk::Vector2D size; ParseTransform(node); ParsePosition(node, pos, size); ParsePaintAttr(node); @@ -63,7 +63,7 @@ bool svg::Group::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2 sizeMax.x = 0; sizeMax.y = 0; - Vector2D tmpPos; + etk::Vector2D tmpPos; // parse all sub node : for(TiXmlNode * child = node->FirstChild(); NULL != child; child = child->NextSibling() ) { svg::Base *elementParser = NULL; diff --git a/parserSVG/Group.h b/parserSVG/Group.h index 3eed91d..cf32856 100644 --- a/parserSVG/Group.h +++ b/parserSVG/Group.h @@ -37,7 +37,7 @@ namespace svg public: Group(PaintState parentPaintState); ~Group(void); - virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax); + virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax); virtual void Display(int32_t spacing); virtual void AggDraw(svg::Renderer& myRenderer, agg::trans_affine& basicTrans); }; diff --git a/parserSVG/Line.cpp b/parserSVG/Line.cpp index 963c9c2..d77ef95 100644 --- a/parserSVG/Line.cpp +++ b/parserSVG/Line.cpp @@ -40,7 +40,7 @@ svg::Line::~Line(void) } -bool svg::Line::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax) +bool svg::Line::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax) { // line must have a minimum size... m_paint.strokeWidth = 1; diff --git a/parserSVG/Line.h b/parserSVG/Line.h index 2d5e453..ff57a82 100644 --- a/parserSVG/Line.h +++ b/parserSVG/Line.h @@ -32,12 +32,12 @@ namespace svg class Line : public svg::Base { private: - Vector2D m_startPos; //!< Start line position - Vector2D m_stopPos; //!< Stop line position + etk::Vector2D m_startPos; //!< Start line position + etk::Vector2D m_stopPos; //!< Stop line position public: Line(PaintState parentPaintState); ~Line(void); - virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax); + virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax); virtual void Display(int32_t spacing); virtual void AggDraw(svg::Renderer& myRenderer, agg::trans_affine& basicTrans); }; diff --git a/parserSVG/Path.cpp b/parserSVG/Path.cpp index 63d1729..415e423 100644 --- a/parserSVG/Path.cpp +++ b/parserSVG/Path.cpp @@ -78,7 +78,7 @@ const char * extractCmd(const char * input, char& cmd, etk::Vector& outpu return outputPointer; } -bool svg::Path::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax) +bool svg::Path::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax) { ParseTransform(node); ParsePaintAttr(node); diff --git a/parserSVG/Path.h b/parserSVG/Path.h index 440fe07..a3e8d35 100644 --- a/parserSVG/Path.h +++ b/parserSVG/Path.h @@ -56,7 +56,7 @@ namespace svg public: Path(PaintState parentPaintState); ~Path(void); - virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax); + virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax); virtual void Display(int32_t spacing); virtual void AggDraw(svg::Renderer& myRenderer, agg::trans_affine& basicTrans); private: diff --git a/parserSVG/Polygon.cpp b/parserSVG/Polygon.cpp index b0d565a..afe7ee7 100644 --- a/parserSVG/Polygon.cpp +++ b/parserSVG/Polygon.cpp @@ -37,7 +37,7 @@ svg::Polygon::~Polygon(void) } -bool svg::Polygon::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax) +bool svg::Polygon::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax) { ParseTransform(node); ParsePaintAttr(node); @@ -58,7 +58,7 @@ bool svg::Polygon::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vecto sizeMax.y = 0; SVG_VERBOSE("Parse polygon : \"" << sss << "\""); while ('\0' != sss[0]) { - Vector2D pos; + etk::Vector2D pos; int32_t n; if (sscanf(sss, "%f,%f%n", &pos.x, &pos.y, &n) == 2) { m_listPoint.PushBack(pos); diff --git a/parserSVG/Polygon.h b/parserSVG/Polygon.h index f2019cb..ffed0a4 100644 --- a/parserSVG/Polygon.h +++ b/parserSVG/Polygon.h @@ -37,12 +37,12 @@ namespace svg class Polygon : public svg::Base { private: - etk::Vector > m_listPoint; //!< list of all point of the polygone + etk::Vector > m_listPoint; //!< list of all point of the polygone PolygonMode_te m_diplayMode; //!< polygone specific display mode public: Polygon(PaintState parentPaintState); ~Polygon(void); - virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax); + virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax); virtual void Display(int32_t spacing); virtual void AggDraw(svg::Renderer& myRenderer, agg::trans_affine& basicTrans); }; diff --git a/parserSVG/Polyline.cpp b/parserSVG/Polyline.cpp index 0686319..8e7eeb7 100644 --- a/parserSVG/Polyline.cpp +++ b/parserSVG/Polyline.cpp @@ -37,7 +37,7 @@ svg::Polyline::~Polyline(void) } -bool svg::Polyline::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax) +bool svg::Polyline::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax) { // line must have a minimum size... m_paint.strokeWidth = 1; @@ -56,7 +56,7 @@ bool svg::Polyline::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vect sizeMax.y = 0; SVG_VERBOSE("Parse polyline : \"" << sss << "\""); while ('\0' != sss[0]) { - Vector2D pos; + etk::Vector2D pos; int32_t n; if (sscanf(sss, "%f,%f %n", &pos.x, &pos.y, &n) == 2) { m_listPoint.PushBack(pos); diff --git a/parserSVG/Polyline.h b/parserSVG/Polyline.h index ff0c0cb..f280fd3 100644 --- a/parserSVG/Polyline.h +++ b/parserSVG/Polyline.h @@ -33,11 +33,11 @@ namespace svg class Polyline : public svg::Base { private: - etk::Vector > m_listPoint; //!< list of all point of the polyline + etk::Vector > m_listPoint; //!< list of all point of the polyline public: Polyline(PaintState parentPaintState); ~Polyline(void); - virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax); + virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax); virtual void Display(int32_t spacing); virtual void AggDraw(svg::Renderer& myRenderer, agg::trans_affine& basicTrans); }; diff --git a/parserSVG/Rectangle.cpp b/parserSVG/Rectangle.cpp index 2eebc2f..6bf7057 100644 --- a/parserSVG/Rectangle.cpp +++ b/parserSVG/Rectangle.cpp @@ -42,7 +42,7 @@ svg::Rectangle::~Rectangle(void) } -bool svg::Rectangle::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax) +bool svg::Rectangle::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax) { m_position.x = 0.0; m_position.y = 0.0; diff --git a/parserSVG/Rectangle.h b/parserSVG/Rectangle.h index 5d0f8bb..294bfec 100644 --- a/parserSVG/Rectangle.h +++ b/parserSVG/Rectangle.h @@ -32,13 +32,13 @@ namespace svg class Rectangle : public svg::Base { private: - Vector2D m_position; //!< position of the rectangle - Vector2D m_size; //!< size of the rectangle - Vector2D m_roundedCorner; //!< property of the rounded corner + etk::Vector2D m_position; //!< position of the rectangle + etk::Vector2D m_size; //!< size of the rectangle + etk::Vector2D m_roundedCorner; //!< property of the rounded corner public: Rectangle(PaintState parentPaintState); ~Rectangle(void); - virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax); + virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax); virtual void Display(int32_t spacing); virtual void AggDraw(svg::Renderer& myRenderer, agg::trans_affine& basicTrans); }; diff --git a/parserSVG/Renderer.h b/parserSVG/Renderer.h index 8268b8a..6ed9704 100644 --- a/parserSVG/Renderer.h +++ b/parserSVG/Renderer.h @@ -54,13 +54,13 @@ namespace svg class PaintState { public: - draw::Color fill; - draw::Color stroke; - float strokeWidth; - bool flagEvenOdd; - lineCap_te lineCap; - lineJoin_te lineJoin; - Vector2D viewPort; + draw::Color fill; + draw::Color stroke; + float strokeWidth; + bool flagEvenOdd; + lineCap_te lineCap; + lineJoin_te lineJoin; + etk::Vector2D viewPort; }; // basic definition type for the renderer @@ -75,7 +75,7 @@ namespace svg Renderer(uint32_t width, uint32_t height); ~Renderer(void); void WritePpm(etk::UString fileName); - Vector2D m_size; + etk::Vector2D m_size; agg::rendering_buffer * m_renderingBuffer; agg::pixfmt_rgba32 * m_pixFrame; rendererBase_t * m_renderBase; diff --git a/parserSVG/Text.cpp b/parserSVG/Text.cpp index 696e88c..01daa45 100644 --- a/parserSVG/Text.cpp +++ b/parserSVG/Text.cpp @@ -35,7 +35,7 @@ svg::Text::~Text(void) } -bool svg::Text::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax) +bool svg::Text::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax) { sizeMax.x = 0; sizeMax.y = 0; diff --git a/parserSVG/Text.h b/parserSVG/Text.h index 4b77424..edcaf73 100644 --- a/parserSVG/Text.h +++ b/parserSVG/Text.h @@ -36,7 +36,7 @@ namespace svg public: Text(PaintState parentPaintState); ~Text(void); - virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D& sizeMax); + virtual bool Parse(TiXmlNode * node, agg::trans_affine& parentTrans, etk::Vector2D& sizeMax); virtual void Display(int32_t spacing); }; }; diff --git a/parserSVG/parserSVG.cpp b/parserSVG/parserSVG.cpp index 9ba92c6..b945223 100644 --- a/parserSVG/parserSVG.cpp +++ b/parserSVG/parserSVG.cpp @@ -111,18 +111,18 @@ svg::Parser::Parser(etk::File fileName) : m_renderedElement(NULL) m_version = version; } // parse ... - Vector2D pos; + etk::Vector2D pos; ParseTransform(root); ParsePosition(root, pos, m_size); ParsePaintAttr(root); SVG_VERBOSE("parsed .ROOT trans : (" << m_transformMatrix.sx << "," << m_transformMatrix.shy << "," << m_transformMatrix.shx << "," << m_transformMatrix.sy << "," << m_transformMatrix.tx << "," << m_transformMatrix.ty << ")"); - Vector2D maxSize; + etk::Vector2D maxSize; maxSize.x = 0.0; maxSize.y = 0.0; - Vector2D size; + etk::Vector2D size; // parse all sub node : for(TiXmlNode * child = root->FirstChild(); NULL != child; child = child->NextSibling() ) { svg::Base *elementParser = NULL; @@ -298,7 +298,7 @@ void svg::Parser::GenerateAnImage(int32_t sizeX, int32_t sizeY) */ } -void svg::Parser::GenerateAnImage(Vector2D size, draw::Image& output) +void svg::Parser::GenerateAnImage(etk::Vector2D size, draw::Image& output) { GenerateAnImage(size.x, size.y); output.Resize(size); diff --git a/parserSVG/parserSVG.h b/parserSVG/parserSVG.h index fcc7968..1a04287 100644 --- a/parserSVG/parserSVG.h +++ b/parserSVG/parserSVG.h @@ -25,7 +25,7 @@ #ifndef __SVG_PARSER_H__ #define __SVG_PARSER_H__ -#include +#include #include #include #include @@ -40,7 +40,7 @@ namespace svg etk::UString m_version; etk::UString m_title; etk::Vector m_subElementList; - Vector2D m_size; + etk::Vector2D m_size; svg::Renderer* m_renderedElement; public: @@ -50,11 +50,11 @@ namespace svg void DisplayDebug(void); void GenerateTestFile(void); void GenerateAnImage(int32_t sizeX, int32_t sizeY); - void GenerateAnImage(Vector2D size, draw::Image& output); + void GenerateAnImage(etk::Vector2D size, draw::Image& output); virtual void AggDraw(svg::Renderer& myRenderer, agg::trans_affine& basicTrans); uint8_t* GetPointerOnData(void); uint32_t GetSizeOnData(void); - Vector2D GetDefinedSize(void) { return m_size;}; + etk::Vector2D GetDefinedSize(void) { return m_size;}; }; };