diff --git a/draw/Color.cpp b/draw/Color.cpp index 1595798..3f267ce 100644 --- a/draw/Color.cpp +++ b/draw/Color.cpp @@ -480,14 +480,14 @@ etk::CCout& agg::operator <<(etk::CCout &os, const struct agg::rgba8& obj) } -etk::UString draw::getHexString(const draw::Color& color) +std::string draw::getHexString(const draw::Color& color) { char colorText[256]; sprintf(colorText, "0x%08X", color.Get()); return colorText; } -etk::UString draw::getString(const draw::Color& color) +std::string draw::getString(const draw::Color& color) { char colorText[256]; sprintf(colorText, "#%08X", color.Get()); diff --git a/draw/Color.h b/draw/Color.h index 1ee74cb..3158fdb 100644 --- a/draw/Color.h +++ b/draw/Color.h @@ -84,8 +84,8 @@ namespace draw { }; void parseColor(const char* _input, struct agg::rgba8& color); - etk::UString getHexString(const draw::Color& color); - etk::UString getString(const draw::Color& color); + std::string getHexString(const draw::Color& color); + std::string getString(const draw::Color& color); namespace color { extern const Color none; diff --git a/draw/Image.cpp b/draw/Image.cpp index 6f9393d..05912fe 100644 --- a/draw/Image.cpp +++ b/draw/Image.cpp @@ -57,7 +57,7 @@ void draw::Image::init(void) // basic element : draw::Color tmpBg(0,0,0,0); // preallocate data with a basic bg elements : - m_data.reSize(m_size.x()*m_size.y(), tmpBg); + m_data.resize(m_size.x()*m_size.y(), tmpBg); if (m_size.x()*m_size.y() > m_data.size()) { DRAW_ERROR("Allocation of data buffer in error"); return; @@ -142,7 +142,7 @@ void draw::Image::resize(ivec2 size) // basic element : draw::Color tmpBg(0,0,0,0); // preallocate data with a basic bg elements : - m_data.reSize(m_size.x()*m_size.y(), tmpBg); + m_data.resize(m_size.x()*m_size.y(), tmpBg); if (m_size.x()*m_size.y() > m_data.size()) { DRAW_ERROR("Allocation of data buffer in error"); return; @@ -231,7 +231,7 @@ void draw::Image::dot(vec2 pos) /* Begin(); MoveTo(pos); - LineTo(pos+etk::Vector2D(1,1)); + LineTo(pos+std::vector2D(1,1)); End(); */ set(pos, m_fillColor); @@ -321,7 +321,7 @@ void draw::Image::distanceField(ivec2 pos, ivec2 size, int32_t upscaler, int32_t { #ifndef BASIC_GRADIENT float maxVal = 1/(1000.0*sqrtf(META_DIST*META_DIST+META_DIST*META_DIST)); - etk::Vector2D tmpPos; + std::vector2D tmpPos; // generate distance system ... matrix ... Grid grid2(ivec2(META_DIST*2,META_DIST*2)); for(tmpPos.setY(0) ; tmpPos.y() -#include +#include #include #include #include @@ -49,8 +49,8 @@ class Grid { public: - etk::Vector2D m_size; - etk::Vector m_data; + std::vector2D m_size; + std::vector m_data; int32_t m_outsideVal; int32_t m_errorVal; Grid(ivec2 _size) { @@ -60,7 +60,7 @@ class Grid // basic element : int32_t tmpPoint = 0; // preallocate data with a basic bg elements : - m_data.reSize(m_size.x()*m_size.y(), tmpPoint); + m_data.resize(m_size.x()*m_size.y(), tmpPoint); }; ~Grid(void) { }; void setOutsideVal(int32_t _newVal) { @@ -69,20 +69,20 @@ class Grid void setErrorVal(int32_t _newVal) { m_errorVal = _newVal; } - void setInide(etk::Vector2D _pos) { + void setInide(std::vector2D _pos) { if( _pos.x()>=0 && _pos.x()=0 && _pos.y() _pos) { + void setOutside(std::vector2D _pos) { if( _pos.x()>=0 && _pos.x()=0 && _pos.y() _pos) { + int32_t get(std::vector2D _pos) { ; if( _pos.x()>0 && _pos.x()0 && _pos.y() _pos, int32_t _val) { + void set(std::vector2D _pos, int32_t _val) { if( _pos.x()>0 && _pos.x()0 && _pos.y() m_data; + std::vector m_data; int32_t m_outsideVal; int32_t m_errorVal; Grid(ivec2 _size) { @@ -111,9 +111,9 @@ class Grid { m_outsideVal = 20; m_errorVal = 0; // basic element : - etk::Vector2D tmpPoint(0,0); + ivec2 tmpPoint(0,0); // preallocate data with a basic bg elements : - m_data.reSize(m_size.x()*m_size.y(), tmpPoint); + m_data.resize(m_size.x()*m_size.y(), tmpPoint); }; ~Grid(void) { }; void setOutsideVal(int32_t _newVal) { @@ -142,7 +142,7 @@ class Grid { // && _pos.y>0 && _pos.y(m_errorVal,m_errorVal); + //return std::vector2D(m_errorVal,m_errorVal); }; void set(ivec2 _pos, ivec2 _val) { @@ -175,7 +175,7 @@ namespace draw class Image { private: ivec2 m_size; - etk::Vector m_data; + std::vector m_data; agg::rendering_buffer * m_renderingBuffer; agg::pixfmt_rgba32 * m_pixFrame; rendererBase_t * m_renderBase; @@ -204,7 +204,7 @@ namespace draw // ----------------------------------------------- public : void resize(ivec2 size); - //void Resize(etk::Vector2D startPos, Vector2D size); + //void Resize(std::vector2D startPos, Vector2D size); ivec2 getSize(void) const { return m_size; @@ -216,7 +216,7 @@ namespace draw return m_size.y(); }; - //void Move(etk::Vector2D pos); + //void Move(std::vector2D pos); //void Rotate(float angle); // radian @@ -249,9 +249,9 @@ namespace draw } } - //Image getSubImage(etk::Vector2D startPos, Vector2D size) const; + //Image getSubImage(std::vector2D startPos, Vector2D size) const; - //void setData(uint8_t *data, etk::Vector2D size); + //void setData(uint8_t *data, std::vector2D size); // ----------------------------------------------- // -- drawing tools :