diff --git a/parserSVG/Base.h b/parserSVG/Base.h index 95db0d7..b0dbd5b 100644 --- a/parserSVG/Base.h +++ b/parserSVG/Base.h @@ -26,7 +26,7 @@ #define __SVG_BASE_H__ #include -#include +#include #include #include diff --git a/parserSVG/Group.cpp b/parserSVG/Group.cpp index 15eff7c..f6f0605 100644 --- a/parserSVG/Group.cpp +++ b/parserSVG/Group.cpp @@ -105,7 +105,7 @@ bool svg::Group::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2 sizeMax.x = etk_max(sizeMax.x, tmpPos.x); sizeMax.y = etk_max(sizeMax.y, tmpPos.y); // add element in the system - m_subElementList.push_back(elementParser); + m_subElementList.PushBack(elementParser); } } } @@ -116,7 +116,7 @@ bool svg::Group::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2 void svg::Group::Display(int32_t spacing) { SVG_DEBUG(SpacingDist(spacing) << "Group (START) fill=" << m_paint.fill << " stroke=" << m_paint.stroke << " stroke-width=" << m_paint.strokeWidth ); - for (int32_t iii=0; iiiDisplay(spacing+1); } @@ -126,7 +126,7 @@ void svg::Group::Display(int32_t spacing) void svg::Group::AggDraw(svg::Renderer& myRenderer, agg::trans_affine& basicTrans) { - for (int32_t iii=0; iiiAggDraw(myRenderer, basicTrans); } diff --git a/parserSVG/Group.h b/parserSVG/Group.h index 05b78b4..e7c619c 100644 --- a/parserSVG/Group.h +++ b/parserSVG/Group.h @@ -26,14 +26,14 @@ #define __SVG_GROUP_H__ #include -#include +#include namespace svg { class Group : public svg::Base { private: - std::vector m_subElementList; //!< group sub elements ... + etk::VectorType m_subElementList; //!< group sub elements ... public: Group(PaintState parentPaintState); ~Group(void); diff --git a/parserSVG/Path.cpp b/parserSVG/Path.cpp index 4caf1bb..321c867 100644 --- a/parserSVG/Path.cpp +++ b/parserSVG/Path.cpp @@ -42,12 +42,12 @@ svg::Path::~Path(void) // return the next char position ... (after 'X' or NULL) -const char * extractCmd(const char * input, char& cmd, std::vector& outputList) +const char * extractCmd(const char * input, char& cmd, etk::VectorType& outputList) { if (*input == '\0') { return NULL; } - outputList.clear(); + outputList.Clear(); cmd = '\0'; const char * outputPointer = NULL; if (!( (input[0] <= 'Z' && input[0] >= 'A') || (input[0] <= 'z' && input[0] >= 'a') ) ) { @@ -67,7 +67,7 @@ const char * extractCmd(const char * input, char& cmd, std::vector& outpu while( sscanf(&input[iii], "%1[, ]%f%n", spacer, &element, &nbElementRead) == 2 || sscanf(&input[iii], "%f%n", &element, &nbElementRead) == 1) { SVG_VERBOSE("Find element : " << element); - outputList.push_back(element); + outputList.PushBack(element); iii += nbElementRead; } outputPointer = &input[iii]; @@ -95,7 +95,7 @@ bool svg::Path::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D SVG_VERBOSE("Parse Path : \"" << elementXML << "\""); char command; - std::vector listDot; + etk::VectorType listDot; for( const char *sss=extractCmd(elementXML, command, listDot); NULL != sss; @@ -123,144 +123,144 @@ bool svg::Path::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vector2D case 'M': // Move To (absolute) case 'm': // Move To (relative) // 2 Elements ... - if(listDot.size()%2 != 0) { - SVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() ); + if(listDot.Size()%2 != 0) { + SVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.Size() ); break; } pathElement.cmd = svg::PATH_ENUM_MOVETO; - if (listDot.size() >= 2) { + if (listDot.Size() >= 2) { pathElement.element[0] = listDot[0]; pathElement.element[1] = listDot[1]; - m_listElement.push_back(pathElement); + m_listElement.PushBack(pathElement); } pathElement.cmd = svg::PATH_ENUM_LINETO; - for(int32_t iii=2; iii #include -#include namespace svg { @@ -53,7 +52,7 @@ namespace svg class Path : public svg::Base { private: - std::vector m_listElement; + etk::VectorType m_listElement; public: Path(PaintState parentPaintState); ~Path(void); diff --git a/parserSVG/Polygon.cpp b/parserSVG/Polygon.cpp index 766ddac..3777411 100644 --- a/parserSVG/Polygon.cpp +++ b/parserSVG/Polygon.cpp @@ -61,7 +61,7 @@ bool svg::Polygon::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vecto Vector2D pos; int32_t n; if (sscanf(sss, "%f,%f%n", &pos.x, &pos.y, &n) == 2) { - m_listPoint.push_back(pos); + m_listPoint.PushBack(pos); sss += n; sizeMax.x = etk_max(sizeMax.x, pos.x); sizeMax.y = etk_max(sizeMax.y, pos.y); @@ -77,7 +77,7 @@ bool svg::Polygon::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vecto void svg::Polygon::Display(int32_t spacing) { - SVG_DEBUG(SpacingDist(spacing) << "Polygon nbPoint=" << m_listPoint.size()); + SVG_DEBUG(SpacingDist(spacing) << "Polygon nbPoint=" << m_listPoint.Size()); } void svg::Polygon::AggDraw(svg::Renderer& myRenderer, agg::trans_affine& basicTrans) @@ -88,7 +88,7 @@ void svg::Polygon::AggDraw(svg::Renderer& myRenderer, agg::trans_affine& basicTr path.start_new_path(); path.move_to(m_listPoint[0].x, m_listPoint[0].y); - for( int32_t iii=1; iii< m_listPoint.size(); iii++) { + for( int32_t iii=1; iii< m_listPoint.Size(); iii++) { path.line_to(m_listPoint[iii].x, m_listPoint[iii].y); } path.close_polygon(); diff --git a/parserSVG/Polygon.h b/parserSVG/Polygon.h index fa87c9f..bac6dec 100644 --- a/parserSVG/Polygon.h +++ b/parserSVG/Polygon.h @@ -26,7 +26,7 @@ #define __SVG_POLYGON_H__ #include -#include +#include namespace svg { @@ -37,8 +37,8 @@ namespace svg class Polygon : public svg::Base { private: - std::vector > m_listPoint; //!< list of all point of the polygone - PolygonMode_te m_diplayMode; //!< polygone specific display mode + etk::VectorType > m_listPoint; //!< list of all point of the polygone + PolygonMode_te m_diplayMode; //!< polygone specific display mode public: Polygon(PaintState parentPaintState); ~Polygon(void); diff --git a/parserSVG/Polyline.cpp b/parserSVG/Polyline.cpp index 4ec1e51..5955b10 100644 --- a/parserSVG/Polyline.cpp +++ b/parserSVG/Polyline.cpp @@ -59,7 +59,7 @@ bool svg::Polyline::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vect Vector2D pos; int32_t n; if (sscanf(sss, "%f,%f %n", &pos.x, &pos.y, &n) == 2) { - m_listPoint.push_back(pos); + m_listPoint.PushBack(pos); sizeMax.x = etk_max(sizeMax.x, pos.x); sizeMax.y = etk_max(sizeMax.y, pos.y); sss += n; @@ -72,7 +72,7 @@ bool svg::Polyline::Parse(TiXmlNode * node, agg::trans_affine& parentTrans, Vect void svg::Polyline::Display(int32_t spacing) { - SVG_DEBUG(SpacingDist(spacing) << "Polyline nbPoint=" << m_listPoint.size()); + SVG_DEBUG(SpacingDist(spacing) << "Polyline nbPoint=" << m_listPoint.Size()); } @@ -81,7 +81,7 @@ void svg::Polyline::AggDraw(svg::Renderer& myRenderer, agg::trans_affine& basicT agg::path_storage path; path.start_new_path(); path.move_to(m_listPoint[0].x, m_listPoint[0].y); - for( int32_t iii=1; iii< m_listPoint.size(); iii++) { + for( int32_t iii=1; iii< m_listPoint.Size(); iii++) { path.line_to(m_listPoint[iii].x, m_listPoint[iii].y); } /* diff --git a/parserSVG/Polyline.h b/parserSVG/Polyline.h index db84131..772c7b2 100644 --- a/parserSVG/Polyline.h +++ b/parserSVG/Polyline.h @@ -26,14 +26,14 @@ #define __SVG_POLYLINE_H__ #include -#include +#include namespace svg { class Polyline : public svg::Base { private: - std::vector > m_listPoint; //!< list of all point of the polyline + etk::VectorType > m_listPoint; //!< list of all point of the polyline public: Polyline(PaintState parentPaintState); ~Polyline(void); diff --git a/parserSVG/Renderer.cpp b/parserSVG/Renderer.cpp index 62715f5..7c9bf58 100644 --- a/parserSVG/Renderer.cpp +++ b/parserSVG/Renderer.cpp @@ -22,8 +22,6 @@ ******************************************************************************* */ -#include -#include #include #include diff --git a/parserSVG/parserSVG.cpp b/parserSVG/parserSVG.cpp index 7d6f38e..d74379d 100644 --- a/parserSVG/parserSVG.cpp +++ b/parserSVG/parserSVG.cpp @@ -184,7 +184,7 @@ svg::Parser::Parser(etk::File fileName) : m_renderedElement(NULL) maxSize.y=size.y; } // add element in the system - m_subElementList.push_back(elementParser); + m_subElementList.PushBack(elementParser); } } } @@ -217,7 +217,7 @@ svg::Parser::~Parser(void) void svg::Parser::DisplayDebug(void) { SVG_DEBUG("Main SVG node : size=" << m_size); - for (int32_t iii=0; iiiDisplay(1); } @@ -227,7 +227,7 @@ void svg::Parser::DisplayDebug(void) void svg::Parser::AggDraw(svg::Renderer& myRenderer, agg::trans_affine& basicTrans) { - for (int32_t iii=0; iiiAggDraw(myRenderer, basicTrans); } diff --git a/parserSVG/parserSVG.h b/parserSVG/parserSVG.h index 9c3b318..bf07a53 100644 --- a/parserSVG/parserSVG.h +++ b/parserSVG/parserSVG.h @@ -26,7 +26,7 @@ #define __SVG_PARSER_H__ #include -#include +#include #include namespace svg @@ -34,13 +34,13 @@ namespace svg class Parser : public svg::Base { private: - etk::File m_fileName; - bool m_loadOK; - etk::UString m_version; - etk::UString m_title; - std::vector m_subElementList; - Vector2D m_size; - svg::Renderer* m_renderedElement; + etk::File m_fileName; + bool m_loadOK; + etk::UString m_version; + etk::UString m_title; + etk::VectorType m_subElementList; + Vector2D m_size; + svg::Renderer* m_renderedElement; public: Parser(etk::File fileName);