From 38e338d731748b3d365941296f76aef6d31c6f13 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Mon, 24 Sep 2018 23:26:06 +0200 Subject: [PATCH] [DEV] integrate the new interface of URI and file --- esvg/Renderer.cpp | 42 +++++++----- esvg/Renderer.hpp | 5 +- esvg/esvg.cpp | 40 +++++------ esvg/esvg.hpp | 16 ++--- esvg/render/Weight.cpp | 3 +- test/main.cpp | 1 + test/main.hpp | 2 + test/testCap.cpp | 48 +++++++------- test/testCircle.cpp | 12 ++-- test/testColor.cpp | 16 ++--- test/testEllipse.cpp | 12 ++-- test/testGradientLinear.cpp | 72 ++++++++++---------- test/testGradientRadial.cpp | 64 +++++++++--------- test/testJoin.cpp | 128 ++++++++++++++++++------------------ test/testLine.cpp | 4 +- test/testPath.cpp | 36 +++++----- test/testPolygon.cpp | 12 ++-- test/testPolyline.cpp | 12 ++-- test/testRectangle.cpp | 24 +++---- test/testStyle.cpp | 4 +- tools/converter.cpp | 2 +- 21 files changed, 284 insertions(+), 271 deletions(-) diff --git a/esvg/Renderer.cpp b/esvg/Renderer.cpp index eeee70e..433163a 100644 --- a/esvg/Renderer.cpp +++ b/esvg/Renderer.cpp @@ -6,7 +6,8 @@ #include #include -#include +#include +#include esvg::Renderer::Renderer(const ivec2& _size, esvg::Document* _document, bool _visualDebug) : #ifdef DEBUG @@ -229,13 +230,17 @@ void esvg::Renderer::print(const esvg::render::Weight& _weightFill, #endif -void esvg::Renderer::writePPM(const etk::String& _fileName) { +void esvg::Renderer::writePPM(const etk::Uri& _uri) { if (m_buffer.size() == 0) { return; } - etk::FSNode tmpFile(_fileName); - if(tmpFile.fileOpenWrite() == false) { - ESVG_ERROR("Can not find the file name=\"" << tmpFile << "\""); + auto fileIo = etk::uri::get(_uri); + if (fileIo == null) { + ESVG_ERROR("Can not create the uri: " << _uri); + return; + } + if (fileIo->open(etk::io::OpenMode::Write) == false) { + ESVG_ERROR("Can not open (r) the file : " << _uri); return; } int32_t sizeX = m_size.x(); @@ -247,12 +252,12 @@ void esvg::Renderer::writePPM(const etk::String& _fileName) { ESVG_DEBUG("Generate ppm : " << m_size << " debug size=" << ivec2(sizeX,sizeY)); char tmpValue[1024]; sprintf(tmpValue, "P6 %d %d 255 ", sizeX, sizeY); - tmpFile.fileWrite(tmpValue,1,sizeof(tmpValue)); + fileIo->write(tmpValue,1,sizeof(tmpValue)); for (int32_t iii=0 ; iii tmp = m_buffer[iii]; - tmpFile.fileWrite(&tmp, 1, 3); + fileIo->write(&tmp, 1, 3); } - tmpFile.fileClose(); + fileIo->close(); } #define PLOPPP extern "C" { @@ -290,14 +295,17 @@ extern "C" { }; #pragma pack(pop) } -void esvg::Renderer::writeBMP(const etk::String& _fileName) { +void esvg::Renderer::writeBMP(const etk::Uri& _uri) { if (m_buffer.size() == 0) { return; } - etk::FSNode tmpFile(_fileName); - - if(tmpFile.fileOpenWrite() == false) { - ESVG_ERROR("Can not find the file name=\"" << tmpFile << "\""); + auto fileIo = etk::uri::get(_uri); + if (fileIo == null) { + ESVG_ERROR("Can not create the uri: " << _uri); + return; + } + if (fileIo->open(etk::io::OpenMode::Write) == false) { + ESVG_ERROR("Can not open (r) the file : " << _uri); return; } struct bitmapFileHeader fileHeader; @@ -346,8 +354,8 @@ void esvg::Renderer::writeBMP(const etk::String& _fileName) { infoHeader.biUnused[12] = 0x00000002; #endif // get the data : - tmpFile.fileWrite(&fileHeader, sizeof(struct bitmapFileHeader), 1); - tmpFile.fileWrite(&infoHeader, sizeof(struct bitmapInfoHeader), 1); + fileIo->write(&fileHeader, sizeof(struct bitmapFileHeader), 1); + fileIo->write(&infoHeader, sizeof(struct bitmapInfoHeader), 1); uint8_t data[16]; for(int32_t yyy=sizeY-1; yyy>=0; --yyy) { @@ -365,10 +373,10 @@ void esvg::Renderer::writeBMP(const etk::String& _fileName) { *pointer++ = tmpColor.g(); *pointer++ = tmpColor.r(); #endif - tmpFile.fileWrite(data,1,4); + fileIo->write(data,1,4); } } - tmpFile.fileClose(); + fileIo->close(); } diff --git a/esvg/Renderer.hpp b/esvg/Renderer.hpp index 53db33a..420627a 100644 --- a/esvg/Renderer.hpp +++ b/esvg/Renderer.hpp @@ -10,6 +10,7 @@ #include #include #include +#include namespace esvg { class Document; @@ -47,8 +48,8 @@ namespace esvg { void setNumberSubScanLine(int32_t _value); int32_t getNumberSubScanLine() const; public: - void writePPM(const etk::String& _fileName); - void writeBMP(const etk::String& _fileName); + void writePPM(const etk::Uri& _uri); + void writeBMP(const etk::Uri& _uri); protected: etk::Color mergeColor(etk::Color _base, etk::Color _integration); public: diff --git a/esvg/esvg.cpp b/esvg/esvg.cpp index 4655521..0fc00f6 100644 --- a/esvg/esvg.cpp +++ b/esvg/esvg.cpp @@ -20,7 +20,7 @@ #include esvg::Document::Document() { - m_fileName = ""; + m_uri = ""; m_version = "0.0"; m_loadOK = false; m_size.setValue(0,0); @@ -58,10 +58,10 @@ void esvg::Document::draw(esvg::Renderer& _myRenderer, mat2x3& _basicTrans, int3 } // FOR TEST only ... -void esvg::Document::generateAnImage(const etk::String& _fileName, bool _visualDebug) { - generateAnImage(m_size, _fileName, _visualDebug); +void esvg::Document::generateAnImage(const etk::Uri& _uri, bool _visualDebug) { + generateAnImage(m_size, _uri, _visualDebug); } -void esvg::Document::generateAnImage(const ivec2& _size, const etk::String& _fileName, bool _visualDebug) { +void esvg::Document::generateAnImage(const ivec2& _size, const etk::Uri& _uri, bool _visualDebug) { ivec2 sizeRender = _size; if (sizeRender.x() <= 0) { sizeRender.setX(m_size.x()); @@ -78,12 +78,12 @@ void esvg::Document::generateAnImage(const ivec2& _size, const etk::String& _fil draw(*renderedElement, basicTrans); - if (etk::end_with(_fileName, ".ppm") == true) { - renderedElement->writePPM(_fileName); - } else if (etk::end_with(_fileName, ".bmp") == true) { - renderedElement->writeBMP(_fileName); + if (_uri.getPath().getExtention() == "ppm") { + renderedElement->writePPM(_uri); + } else if (_uri.getPath().getExtention() == "bmp") { + renderedElement->writeBMP(_uri); } else { - ESVG_ERROR("Can not store with this extention : " << _fileName << " not in .bmp/.ppm"); + ESVG_ERROR("Can not store with this extention : " << _uri << " not in .bmp/.ppm"); } } @@ -140,7 +140,7 @@ etk::Vector> esvg::Document::renderImageU8RGB(ivec2& _size } void esvg::Document::clear() { - m_fileName = ""; + m_uri = ""; m_version = "0.0"; m_loadOK = true; m_paint.clear(); @@ -152,18 +152,18 @@ bool esvg::Document::parse(const etk::String& _data) { clear(); exml::Document doc; if (doc.parse(_data) == false) { - ESVG_ERROR("Error occured when loading SVG: " << m_fileName); + ESVG_ERROR("Error occured when loading SVG: " << m_uri); m_loadOK = false; return m_loadOK; } if (doc.nodes.size() == 0) { - ESVG_ERROR("(l ?) No nodes in the SVG file ... '" << m_fileName << "'"); + ESVG_ERROR("(l ?) No nodes in the SVG file ... '" << m_uri << "'"); m_loadOK = false; return m_loadOK; } exml::Element root = doc.nodes["svg"]; if (root.exist() == false) { - ESVG_ERROR("(l ?) main node not find: 'svg' in '" << m_fileName << "'"); + ESVG_ERROR("(l ?) main node not find: 'svg' in '" << m_uri << "'"); m_loadOK = false; return m_loadOK; } @@ -176,23 +176,23 @@ bool esvg::Document::generate(etk::String& _data) { return false; } -bool esvg::Document::load(const etk::String& _file) { +bool esvg::Document::load(const etk::Uri& _uri) { clear(); - m_fileName = _file; + m_uri = _uri; exml::Document doc; - if (doc.load(m_fileName) == false) { - ESVG_ERROR("Error occured when loading SVG : " << m_fileName); + if (doc.load(m_uri) == false) { + ESVG_ERROR("Error occured when loading SVG : " << m_uri); m_loadOK = false; return m_loadOK; } if (doc.nodes.size() == 0) { - ESVG_ERROR("(l ?) No nodes in the SVG file ... '" << m_fileName << "'"); + ESVG_ERROR("(l ?) No nodes in the SVG file ... '" << m_uri << "'"); m_loadOK = false; return m_loadOK; } exml::Element root = doc.nodes["svg"]; if (root.exist() == false) { - ESVG_ERROR("(l ?) main node not find: 'svg' in '" << m_fileName << "'"); + ESVG_ERROR("(l ?) main node not find: 'svg' in '" << m_uri << "'"); m_loadOK = false; return m_loadOK; } @@ -201,7 +201,7 @@ bool esvg::Document::load(const etk::String& _file) { return m_loadOK; } -bool esvg::Document::store(const etk::String& _file) { +bool esvg::Document::store(const etk::Uri& _uri) { ESVG_TODO("not implemented store in SVG..."); return false; } diff --git a/esvg/esvg.hpp b/esvg/esvg.hpp index cee6601..d8682c8 100644 --- a/esvg/esvg.hpp +++ b/esvg/esvg.hpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include @@ -18,7 +18,7 @@ namespace esvg { class Document : public esvg::Base { private: - etk::String m_fileName; + etk::Uri m_uri; bool m_loadOK; etk::String m_version; etk::String m_title; @@ -45,18 +45,18 @@ namespace esvg { bool generate(etk::String& _data); /** * @brief Load the file that might contain the svg - * @param[in] _file Filename of the svg (compatible with etk FSNode naming) + * @param[in] _uri File of the svg * @return false : An error occured * @return true : Parsing is OK */ - bool load(const etk::String& _file); + bool load(const etk::Uri& _uri); /** * @brief Store the SVG in the file - * @param[in] _file Filename of the svg (compatible with etk FSNode naming) + * @param[in] _uri File of the svg * @return false : An error occured * @return true : Parsing is OK */ - bool store(const etk::String& _file); + bool store(const etk::Uri& _uri); protected: /** * @brief change all style in a xml atribute @@ -72,8 +72,8 @@ namespace esvg { */ void displayDebug(); // TODO: remove this fucntion : use generic function ... - void generateAnImage(const etk::String& _fileName, bool _visualDebug=false); - void generateAnImage(const ivec2& _size, const etk::String& _fileName, bool _visualDebug=false); + void generateAnImage(const etk::Uri& _uri, bool _visualDebug=false); + void generateAnImage(const ivec2& _size, const etk::Uri& _uri, bool _visualDebug=false); /** * @brief Generate Image in a specific format. * @param[in,out] _size Size expected of the rendered image (value <=0 if it need to be automatic.) return the size generate diff --git a/esvg/render/Weight.cpp b/esvg/render/Weight.cpp index e04df4c..f40bd1f 100644 --- a/esvg/render/Weight.cpp +++ b/esvg/render/Weight.cpp @@ -6,6 +6,7 @@ #include #include +#include esvg::render::Weight::Weight() : m_size(0,0) { @@ -145,7 +146,7 @@ void esvg::render::Weight::generate(ivec2 _size, int32_t _subSamplingCount, cons } ESVG_VERBOSE(" List position " << listPosition.size()); // now we order position of the xPosition: - listPosition.sort(0, listPosition.size(), sortXPosFunction); + etk::algorithm::quickSort(listPosition, sortXPosFunction); // move through all element in the point: int32_t lastState = 0; float currentValue = 0.0f; diff --git a/test/main.cpp b/test/main.cpp index d576af9..1af352c 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -14,6 +14,7 @@ bool g_visualDebug = false; int main(int _argc, const char *_argv[]) { etest::init(_argc, _argv); + etk::init(_argc, _argv); for (int32_t iii=0; iii<_argc ; ++iii) { etk::String data = _argv[iii]; #ifdef DEBUG diff --git a/test/main.hpp b/test/main.hpp index 9a680fd..3621c93 100644 --- a/test/main.hpp +++ b/test/main.hpp @@ -7,6 +7,8 @@ */ #include +#include + #pragma once diff --git a/test/testCap.cpp b/test/testCap.cpp index d686e83..01f9a50 100644 --- a/test/testCap.cpp +++ b/test/testCap.cpp @@ -16,8 +16,8 @@ TEST(TestCap, butt) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestCap_butt.svg", data); - doc.generateAnImage("TestCap_butt.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestCap_butt.svg"), data); + doc.generateAnImage(etk::Path("TestCap_butt.bmp"), g_visualDebug); } TEST(TestCap, round) { @@ -28,8 +28,8 @@ TEST(TestCap, round) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestCap_round.svg", data); - doc.generateAnImage("TestCap_round.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestCap_round.svg"), data); + doc.generateAnImage(etk::Path("TestCap_round.bmp"), g_visualDebug); } TEST(TestCap, square) { @@ -40,8 +40,8 @@ TEST(TestCap, square) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestCap_square.svg", data); - doc.generateAnImage("TestCap_square.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestCap_square.svg"), data); + doc.generateAnImage(etk::Path("TestCap_square.bmp"), g_visualDebug); } @@ -53,8 +53,8 @@ TEST(TestCap, buttVert) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestCap_buttVert.svg", data); - doc.generateAnImage("TestCap_buttVert.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestCap_buttVert.svg"), data); + doc.generateAnImage(etk::Path("TestCap_buttVert.bmp"), g_visualDebug); } TEST(TestCap, roundVert) { @@ -65,8 +65,8 @@ TEST(TestCap, roundVert) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestCap_roundVert.svg", data); - doc.generateAnImage("TestCap_roundVert.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestCap_roundVert.svg"), data); + doc.generateAnImage(etk::Path("TestCap_roundVert.bmp"), g_visualDebug); } TEST(TestCap, squareVert) { @@ -77,8 +77,8 @@ TEST(TestCap, squareVert) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestCap_squareVert.svg", data); - doc.generateAnImage("TestCap_squareVert.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestCap_squareVert.svg"), data); + doc.generateAnImage(etk::Path("TestCap_squareVert.bmp"), g_visualDebug); } @@ -91,8 +91,8 @@ TEST(TestCap, buttDiag1) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestCap_buttDiag1.svg", data); - doc.generateAnImage("TestCap_buttDiag1.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestCap_buttDiag1.svg"), data); + doc.generateAnImage(etk::Path("TestCap_buttDiag1.bmp"), g_visualDebug); } TEST(TestCap, roundDiag1) { @@ -103,8 +103,8 @@ TEST(TestCap, roundDiag1) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestCap_roundDiag1.svg", data); - doc.generateAnImage("TestCap_roundDiag1.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestCap_roundDiag1.svg"), data); + doc.generateAnImage(etk::Path("TestCap_roundDiag1.bmp"), g_visualDebug); } TEST(TestCap, squareDiag1) { @@ -115,8 +115,8 @@ TEST(TestCap, squareDiag1) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestCap_squareDiag1.svg", data); - doc.generateAnImage("TestCap_squareDiag1.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestCap_squareDiag1.svg"), data); + doc.generateAnImage(etk::Path("TestCap_squareDiag1.bmp"), g_visualDebug); } @@ -128,8 +128,8 @@ TEST(TestCap, buttDiag2) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestCap_buttDiag2.svg", data); - doc.generateAnImage("TestCap_buttDiag2.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestCap_buttDiag2.svg"), data); + doc.generateAnImage(etk::Path("TestCap_buttDiag2.bmp"), g_visualDebug); } TEST(TestCap, roundDiag2) { @@ -140,8 +140,8 @@ TEST(TestCap, roundDiag2) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestCap_roundDiag2.svg", data); - doc.generateAnImage("TestCap_roundDiag2.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestCap_roundDiag2.svg"), data); + doc.generateAnImage(etk::Path("TestCap_roundDiag2.bmp"), g_visualDebug); } TEST(TestCap, squareDiag2) { @@ -152,7 +152,7 @@ TEST(TestCap, squareDiag2) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestCap_squareDiag2.svg", data); - doc.generateAnImage("TestCap_squareDiag2.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestCap_squareDiag2.svg"), data); + doc.generateAnImage(etk::Path("TestCap_squareDiag2.bmp"), g_visualDebug); } diff --git a/test/testCircle.cpp b/test/testCircle.cpp index a72b614..ec0cb8d 100644 --- a/test/testCircle.cpp +++ b/test/testCircle.cpp @@ -15,8 +15,8 @@ TEST(TestCircle, fill) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestCircle_fill.svg", data); - doc.generateAnImage("TestCircle_fill.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestCircle_fill.svg"), data); + doc.generateAnImage(etk::Path("TestCircle_fill.bmp"), g_visualDebug); } TEST(TestCircle, stroke) { @@ -26,8 +26,8 @@ TEST(TestCircle, stroke) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestCircle_stroke.svg", data); - doc.generateAnImage("TestCircle_stroke.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestCircle_stroke.svg"), data); + doc.generateAnImage(etk::Path("TestCircle_stroke.bmp"), g_visualDebug); } TEST(TestCircle, fill_and_stroke) { @@ -37,6 +37,6 @@ TEST(TestCircle, fill_and_stroke) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestCircle_fill_and_stroke.svg", data); - doc.generateAnImage("TestCircle_fill_and_stroke.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestCircle_fill_and_stroke.svg"), data); + doc.generateAnImage(etk::Path("TestCircle_fill_and_stroke.bmp"), g_visualDebug); } diff --git a/test/testColor.cpp b/test/testColor.cpp index b2405bd..3074197 100644 --- a/test/testColor.cpp +++ b/test/testColor.cpp @@ -15,8 +15,8 @@ TEST(TestColor, blending) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestColor_blending.svg", data); - doc.generateAnImage("TestColor_blending.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestColor_blending.svg"), data); + doc.generateAnImage(etk::Path("TestColor_blending.bmp"), g_visualDebug); } TEST(TestColor, opacity) { @@ -26,8 +26,8 @@ TEST(TestColor, opacity) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestColor_opacity.svg", data); - doc.generateAnImage("TestColor_opacity.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestColor_opacity.svg"), data); + doc.generateAnImage(etk::Path("TestColor_opacity.bmp"), g_visualDebug); } TEST(TestColor, blending_and_opacity) { @@ -37,8 +37,8 @@ TEST(TestColor, blending_and_opacity) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestColor_blending_and_opacity.svg", data); - doc.generateAnImage("TestColor_blending_and_opacity.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestColor_blending_and_opacity.svg"), data); + doc.generateAnImage(etk::Path("TestColor_blending_and_opacity.bmp"), g_visualDebug); } TEST(TestColor, multiple_layer) { @@ -50,6 +50,6 @@ TEST(TestColor, multiple_layer) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestColor_multiple_layer.svg", data); - doc.generateAnImage("TestColor_multiple_layer.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestColor_multiple_layer.svg"), data); + doc.generateAnImage(etk::Path("TestColor_multiple_layer.bmp"), g_visualDebug); } diff --git a/test/testEllipse.cpp b/test/testEllipse.cpp index e48f70a..8397455 100644 --- a/test/testEllipse.cpp +++ b/test/testEllipse.cpp @@ -15,8 +15,8 @@ TEST(TestEllipse, fill) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestEllipse_fill.svg", data); - doc.generateAnImage("TestEllipse_fill.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestEllipse_fill.svg"), data); + doc.generateAnImage(etk::Path("TestEllipse_fill.bmp"), g_visualDebug); } TEST(TestEllipse, stroke) { @@ -26,8 +26,8 @@ TEST(TestEllipse, stroke) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestEllipse_stroke.svg", data); - doc.generateAnImage("TestEllipse_stroke.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestEllipse_stroke.svg"), data); + doc.generateAnImage(etk::Path("TestEllipse_stroke.bmp"), g_visualDebug); } TEST(TestEllipse, fill_and_stroke) { @@ -37,7 +37,7 @@ TEST(TestEllipse, fill_and_stroke) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestEllipse_fill_and_stroke.svg", data); - doc.generateAnImage("TestEllipse_fill_and_stroke.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestEllipse_fill_and_stroke.svg"), data); + doc.generateAnImage(etk::Path("TestEllipse_fill_and_stroke.bmp"), g_visualDebug); } diff --git a/test/testGradientLinear.cpp b/test/testGradientLinear.cpp index 0198258..fe8f5fa 100644 --- a/test/testGradientLinear.cpp +++ b/test/testGradientLinear.cpp @@ -23,8 +23,8 @@ TEST(TestGradientLinear, horizontal) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_horizontal.svg", data); - doc.generateAnImage("TestGradientLinear_horizontal.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_horizontal.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_horizontal.bmp"), g_visualDebug); } @@ -43,8 +43,8 @@ TEST(TestGradientLinear, vertical) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_vertical.svg", data); - doc.generateAnImage("TestGradientLinear_vertical.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_vertical.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_vertical.bmp"), g_visualDebug); } TEST(TestGradientLinear, diag1) { @@ -62,8 +62,8 @@ TEST(TestGradientLinear, diag1) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_diag1.svg", data); - doc.generateAnImage("TestGradientLinear_diag1.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_diag1.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_diag1.bmp"), g_visualDebug); } TEST(TestGradientLinear, diag1Partiel) { @@ -79,8 +79,8 @@ TEST(TestGradientLinear, diag1Partiel) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_diag1Partiel.svg", data); - doc.generateAnImage("TestGradientLinear_diag1Partiel.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_diag1Partiel.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_diag1Partiel.bmp"), g_visualDebug); } TEST(TestGradientLinear, diag2) { @@ -98,8 +98,8 @@ TEST(TestGradientLinear, diag2) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_diag2.svg", data); - doc.generateAnImage("TestGradientLinear_diag2.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_diag2.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_diag2.bmp"), g_visualDebug); } @@ -119,8 +119,8 @@ TEST(TestGradientLinear, diag2Rotate0) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_diag2Rotate0.svg", data); - doc.generateAnImage("TestGradientLinear_diag2Rotate0.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_diag2Rotate0.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_diag2Rotate0.bmp"), g_visualDebug); } TEST(TestGradientLinear, diag2Rotate1) { @@ -138,8 +138,8 @@ TEST(TestGradientLinear, diag2Rotate1) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_diag2Rotate1.svg", data); - doc.generateAnImage("TestGradientLinear_diag2Rotate1.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_diag2Rotate1.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_diag2Rotate1.bmp"), g_visualDebug); } TEST(TestGradientLinear, diag2Rotate2) { @@ -157,8 +157,8 @@ TEST(TestGradientLinear, diag2Rotate2) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_diag2Rotate2.svg", data); - doc.generateAnImage("TestGradientLinear_diag2Rotate2.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_diag2Rotate2.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_diag2Rotate2.bmp"), g_visualDebug); } TEST(TestGradientLinear, diag2scale) { @@ -176,8 +176,8 @@ TEST(TestGradientLinear, diag2scale) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_diag2scale.svg", data); - doc.generateAnImage("TestGradientLinear_diag2scale.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_diag2scale.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_diag2scale.bmp"), g_visualDebug); } TEST(TestGradientLinear, internalHref) { @@ -196,8 +196,8 @@ TEST(TestGradientLinear, internalHref) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_internalHref.svg", data); - doc.generateAnImage("TestGradientLinear_internalHref.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_internalHref.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_internalHref.bmp"), g_visualDebug); } @@ -214,8 +214,8 @@ TEST(TestGradientLinear, unitBox_spreadNone) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_unitBox_spreadNone.svg", data); - doc.generateAnImage("TestGradientLinear_unitBox_spreadNone.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_unitBox_spreadNone.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_unitBox_spreadNone.bmp"), g_visualDebug); } TEST(TestGradientLinear, unitBox_spreadPad) { @@ -231,8 +231,8 @@ TEST(TestGradientLinear, unitBox_spreadPad) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_unitBox_spreadPad.svg", data); - doc.generateAnImage("TestGradientLinear_unitBox_spreadPad.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_unitBox_spreadPad.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_unitBox_spreadPad.bmp"), g_visualDebug); } @@ -249,8 +249,8 @@ TEST(TestGradientLinear, unitBox_spreadReflect) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_unitBox_spreadReflect.svg", data); - doc.generateAnImage("TestGradientLinear_unitBox_spreadReflect.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_unitBox_spreadReflect.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_unitBox_spreadReflect.bmp"), g_visualDebug); } @@ -267,8 +267,8 @@ TEST(TestGradientLinear, unitBox_spreadRepeat) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_unitBox_spreadRepeat.svg", data); - doc.generateAnImage("TestGradientLinear_unitBox_spreadRepeat.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_unitBox_spreadRepeat.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_unitBox_spreadRepeat.bmp"), g_visualDebug); } TEST(TestGradientLinear, unitUser_spreadNone) { @@ -284,8 +284,8 @@ TEST(TestGradientLinear, unitUser_spreadNone) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_unitUser_spreadNone.svg", data); - doc.generateAnImage("TestGradientLinear_unitUser_spreadNone.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_unitUser_spreadNone.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_unitUser_spreadNone.bmp"), g_visualDebug); } TEST(TestGradientLinear, unitUser_spreadPad) { @@ -301,8 +301,8 @@ TEST(TestGradientLinear, unitUser_spreadPad) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_unitUser_spreadPad.svg", data); - doc.generateAnImage("TestGradientLinear_unitUser_spreadPad.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_unitUser_spreadPad.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_unitUser_spreadPad.bmp"), g_visualDebug); } @@ -319,8 +319,8 @@ TEST(TestGradientLinear, unitUser_spreadReflect) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_unitUser_spreadReflect.svg", data); - doc.generateAnImage("TestGradientLinear_unitUser_spreadReflect.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_unitUser_spreadReflect.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_unitUser_spreadReflect.bmp"), g_visualDebug); } @@ -337,7 +337,7 @@ TEST(TestGradientLinear, unitUser_spreadRepeate) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientLinear_unitUser_spreadRepeate.svg", data); - doc.generateAnImage("TestGradientLinear_unitUser_spreadRepeate.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientLinear_unitUser_spreadRepeate.svg"), data); + doc.generateAnImage(etk::Path("TestGradientLinear_unitUser_spreadRepeate.bmp"), g_visualDebug); } diff --git a/test/testGradientRadial.cpp b/test/testGradientRadial.cpp index 19b3ec1..ae8693b 100644 --- a/test/testGradientRadial.cpp +++ b/test/testGradientRadial.cpp @@ -23,8 +23,8 @@ TEST(TestGradientRadial, circle) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_circle.svg", data); - doc.generateAnImage("TestGradientRadial_circle.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_circle.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_circle.bmp"), g_visualDebug); } @@ -43,8 +43,8 @@ TEST(TestGradientRadial, full) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_full.svg", data); - doc.generateAnImage("TestGradientRadial_full.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_full.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_full.bmp"), g_visualDebug); } @@ -63,8 +63,8 @@ TEST(TestGradientRadial, partial) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_partial.svg", data); - doc.generateAnImage("TestGradientRadial_partial.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_partial.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_partial.bmp"), g_visualDebug); } TEST(TestGradientRadial, unitBox_spreadNone) { @@ -82,8 +82,8 @@ TEST(TestGradientRadial, unitBox_spreadNone) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_unitBox_spreadNone.svg", data); - doc.generateAnImage("TestGradientRadial_unitBox_spreadNone.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_unitBox_spreadNone.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_unitBox_spreadNone.bmp"), g_visualDebug); } TEST(TestGradientRadial, unitBox_spreadPad) { @@ -101,8 +101,8 @@ TEST(TestGradientRadial, unitBox_spreadPad) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_unitBox_spreadPad.svg", data); - doc.generateAnImage("TestGradientRadial_unitBox_spreadPad.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_unitBox_spreadPad.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_unitBox_spreadPad.bmp"), g_visualDebug); } TEST(TestGradientRadial, unitBox_spreadReflect) { @@ -120,8 +120,8 @@ TEST(TestGradientRadial, unitBox_spreadReflect) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_unitBox_spreadReflect.svg", data); - doc.generateAnImage("TestGradientRadial_unitBox_spreadReflect.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_unitBox_spreadReflect.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_unitBox_spreadReflect.bmp"), g_visualDebug); } @@ -140,8 +140,8 @@ TEST(TestGradientRadial, unitBox_spreadRepeat) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_unitBox_spreadRepeat.svg", data); - doc.generateAnImage("TestGradientRadial_unitBox_spreadRepeat.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_unitBox_spreadRepeat.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_unitBox_spreadRepeat.bmp"), g_visualDebug); } @@ -160,8 +160,8 @@ TEST(TestGradientRadial, unitUser_spreadNone) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_unitUser_spreadNone.svg", data); - doc.generateAnImage("TestGradientRadial_unitUser_spreadNone.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_unitUser_spreadNone.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_unitUser_spreadNone.bmp"), g_visualDebug); } TEST(TestGradientRadial, unitUser_spreadPad) { @@ -179,8 +179,8 @@ TEST(TestGradientRadial, unitUser_spreadPad) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_unitUser_spreadPad.svg", data); - doc.generateAnImage("TestGradientRadial_unitUser_spreadPad.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_unitUser_spreadPad.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_unitUser_spreadPad.bmp"), g_visualDebug); } TEST(TestGradientRadial, unitUser_spreadReflect) { @@ -198,8 +198,8 @@ TEST(TestGradientRadial, unitUser_spreadReflect) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_unitUser_spreadReflect.svg", data); - doc.generateAnImage("TestGradientRadial_unitUser_spreadReflect.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_unitUser_spreadReflect.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_unitUser_spreadReflect.bmp"), g_visualDebug); } @@ -218,8 +218,8 @@ TEST(TestGradientRadial, unitUser_spreadRepeat) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_unitUser_spreadRepeat.svg", data); - doc.generateAnImage("TestGradientRadial_unitUser_spreadRepeat.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_unitUser_spreadRepeat.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_unitUser_spreadRepeat.bmp"), g_visualDebug); } TEST(TestGradientRadial, unitUser_spreadPad_unCenter) { @@ -237,8 +237,8 @@ TEST(TestGradientRadial, unitUser_spreadPad_unCenter) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_unitUser_spreadPad_unCenter.svg", data); - doc.generateAnImage("TestGradientRadial_unitUser_spreadPad_unCenter.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_unitUser_spreadPad_unCenter.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_unitUser_spreadPad_unCenter.bmp"), g_visualDebug); } TEST(TestGradientRadial, unitUser_spreadReflect_unCenter) { @@ -256,8 +256,8 @@ TEST(TestGradientRadial, unitUser_spreadReflect_unCenter) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_unitUser_spreadReflect_unCenter.svg", data); - doc.generateAnImage("TestGradientRadial_unitUser_spreadReflect_unCenter.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_unitUser_spreadReflect_unCenter.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_unitUser_spreadReflect_unCenter.bmp"), g_visualDebug); } TEST(TestGradientRadial, unitUser_spreadRepeat_unCenter) { @@ -275,8 +275,8 @@ TEST(TestGradientRadial, unitUser_spreadRepeat_unCenter) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_unitUser_spreadRepeat_unCenter.svg", data); - doc.generateAnImage("TestGradientRadial_unitUser_spreadRepeat_unCenter.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_unitUser_spreadRepeat_unCenter.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_unitUser_spreadRepeat_unCenter.bmp"), g_visualDebug); } TEST(TestGradientRadial, unitUser_spreadRepeat_unCenter2) { @@ -294,8 +294,8 @@ TEST(TestGradientRadial, unitUser_spreadRepeat_unCenter2) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_unitUser_spreadRepeat_unCenter2.svg", data); - doc.generateAnImage("TestGradientRadial_unitUser_spreadRepeat_unCenter2.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_unitUser_spreadRepeat_unCenter2.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_unitUser_spreadRepeat_unCenter2.bmp"), g_visualDebug); } @@ -314,6 +314,6 @@ TEST(TestGradientRadial, unitUser_spreadRepeat_out) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestGradientRadial_unitUser_spreadRepeat_out.svg", data); - doc.generateAnImage("TestGradientRadial_unitUser_spreadRepeat_out.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestGradientRadial_unitUser_spreadRepeat_out.svg"), data); + doc.generateAnImage(etk::Path("TestGradientRadial_unitUser_spreadRepeat_out.bmp"), g_visualDebug); } \ No newline at end of file diff --git a/test/testJoin.cpp b/test/testJoin.cpp index 934971a..71fc632 100644 --- a/test/testJoin.cpp +++ b/test/testJoin.cpp @@ -17,8 +17,8 @@ TEST(TestJoin, miterRight1) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_miterRight1.svg", data); - doc.generateAnImage("TestJoin_miterRight1.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_miterRight1.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_miterRight1.bmp"), g_visualDebug); } TEST(TestJoin, miterRight2) { @@ -28,8 +28,8 @@ TEST(TestJoin, miterRight2) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_miterRight2.svg", data); - doc.generateAnImage("TestJoin_miterRight2.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_miterRight2.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_miterRight2.bmp"), g_visualDebug); } TEST(TestJoin, miterRight3) { @@ -39,8 +39,8 @@ TEST(TestJoin, miterRight3) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_miterRight3.svg", data); - doc.generateAnImage("TestJoin_miterRight3.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_miterRight3.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_miterRight3.bmp"), g_visualDebug); } TEST(TestJoin, miterRight4) { @@ -50,8 +50,8 @@ TEST(TestJoin, miterRight4) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_miterRight4.svg", data); - doc.generateAnImage("TestJoin_miterRight4.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_miterRight4.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_miterRight4.bmp"), g_visualDebug); } TEST(TestJoin, miterLeft1) { @@ -61,8 +61,8 @@ TEST(TestJoin, miterLeft1) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_miterLeft1.svg", data); - doc.generateAnImage("TestJoin_miterLeft1.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_miterLeft1.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_miterLeft1.bmp"), g_visualDebug); } TEST(TestJoin, miterLeft2) { @@ -72,8 +72,8 @@ TEST(TestJoin, miterLeft2) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_miterLeft2.svg", data); - doc.generateAnImage("TestJoin_miterLeft2.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_miterLeft2.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_miterLeft2.bmp"), g_visualDebug); } TEST(TestJoin, miterLeft3) { @@ -83,8 +83,8 @@ TEST(TestJoin, miterLeft3) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_miterLeft3.svg", data); - doc.generateAnImage("TestJoin_miterLeft3.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_miterLeft3.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_miterLeft3.bmp"), g_visualDebug); } TEST(TestJoin, miterLeft4) { @@ -94,8 +94,8 @@ TEST(TestJoin, miterLeft4) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_miterLeft4.svg", data); - doc.generateAnImage("TestJoin_miterLeft4.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_miterLeft4.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_miterLeft4.bmp"), g_visualDebug); } TEST(TestJoin, miterLimit1) { @@ -105,8 +105,8 @@ TEST(TestJoin, miterLimit1) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_miterLimit1.svg", data); - doc.generateAnImage("TestJoin_miterLimit1.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_miterLimit1.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_miterLimit1.bmp"), g_visualDebug); } TEST(TestJoin, miterLimit2) { @@ -116,8 +116,8 @@ TEST(TestJoin, miterLimit2) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_miterLimit2.svg", data); - doc.generateAnImage("TestJoin_miterLimit2.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_miterLimit2.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_miterLimit2.bmp"), g_visualDebug); } TEST(TestJoin, miterLimit3) { @@ -127,8 +127,8 @@ TEST(TestJoin, miterLimit3) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_miterLimit3.svg", data); - doc.generateAnImage("TestJoin_miterLimit3.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_miterLimit3.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_miterLimit3.bmp"), g_visualDebug); } TEST(TestJoin, miterLimit4) { @@ -138,8 +138,8 @@ TEST(TestJoin, miterLimit4) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_miterLimit4.svg", data); - doc.generateAnImage("TestJoin_miterLimit4.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_miterLimit4.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_miterLimit4.bmp"), g_visualDebug); } TEST(TestJoin, miterCornerCasePath) { @@ -151,8 +151,8 @@ TEST(TestJoin, miterCornerCasePath) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_miterCornerCasePath.svg", data); - doc.generateAnImage("TestJoin_miterCornerCasePath.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_miterCornerCasePath.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_miterCornerCasePath.bmp"), g_visualDebug); } TEST(TestJoin, miterCornerCasePathLimit) { @@ -164,8 +164,8 @@ TEST(TestJoin, miterCornerCasePathLimit) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_miterCornerCasePathLimit.svg", data); - doc.generateAnImage("TestJoin_miterCornerCasePathLimit.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_miterCornerCasePathLimit.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_miterCornerCasePathLimit.bmp"), g_visualDebug); } // ------------------------------------------------------ Round test ----------------------------------------------------- @@ -177,8 +177,8 @@ TEST(TestJoin, roundRight1) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_roundRight1.svg", data); - doc.generateAnImage("TestJoin_roundRight1.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_roundRight1.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_roundRight1.bmp"), g_visualDebug); } TEST(TestJoin, roundRight2) { @@ -188,8 +188,8 @@ TEST(TestJoin, roundRight2) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_roundRight2.svg", data); - doc.generateAnImage("TestJoin_roundRight2.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_roundRight2.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_roundRight2.bmp"), g_visualDebug); } TEST(TestJoin, roundRight3) { @@ -199,8 +199,8 @@ TEST(TestJoin, roundRight3) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_roundRight3.svg", data); - doc.generateAnImage("TestJoin_roundRight3.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_roundRight3.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_roundRight3.bmp"), g_visualDebug); } TEST(TestJoin, roundRight4) { @@ -210,8 +210,8 @@ TEST(TestJoin, roundRight4) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_roundRight4.svg", data); - doc.generateAnImage("TestJoin_roundRight4.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_roundRight4.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_roundRight4.bmp"), g_visualDebug); } TEST(TestJoin, roundLeft1) { @@ -221,8 +221,8 @@ TEST(TestJoin, roundLeft1) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_roundLeft1.svg", data); - doc.generateAnImage("TestJoin_roundLeft1.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_roundLeft1.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_roundLeft1.bmp"), g_visualDebug); } TEST(TestJoin, roundLeft2) { @@ -232,8 +232,8 @@ TEST(TestJoin, roundLeft2) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_roundLeft2.svg", data); - doc.generateAnImage("TestJoin_roundLeft2.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_roundLeft2.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_roundLeft2.bmp"), g_visualDebug); } TEST(TestJoin, roundLeft3) { @@ -243,8 +243,8 @@ TEST(TestJoin, roundLeft3) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_roundLeft3.svg", data); - doc.generateAnImage("TestJoin_roundLeft3.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_roundLeft3.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_roundLeft3.bmp"), g_visualDebug); } TEST(TestJoin, roundLeft4) { @@ -254,8 +254,8 @@ TEST(TestJoin, roundLeft4) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_roundLeft4.svg", data); - doc.generateAnImage("TestJoin_roundLeft4.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_roundLeft4.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_roundLeft4.bmp"), g_visualDebug); } TEST(TestJoin, roundCornerCasePath) { @@ -267,8 +267,8 @@ TEST(TestJoin, roundCornerCasePath) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_roundCornerCasePath.svg", data); - doc.generateAnImage("TestJoin_roundCornerCasePath.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_roundCornerCasePath.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_roundCornerCasePath.bmp"), g_visualDebug); } @@ -281,8 +281,8 @@ TEST(TestJoin, bevelRight1) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_bevelRight1.svg", data); - doc.generateAnImage("TestJoin_bevelRight1.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_bevelRight1.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_bevelRight1.bmp"), g_visualDebug); } TEST(TestJoin, bevelRight2) { @@ -292,8 +292,8 @@ TEST(TestJoin, bevelRight2) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_bevelRight2.svg", data); - doc.generateAnImage("TestJoin_bevelRight2.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_bevelRight2.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_bevelRight2.bmp"), g_visualDebug); } TEST(TestJoin, bevelRight3) { @@ -303,8 +303,8 @@ TEST(TestJoin, bevelRight3) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_bevelRight3.svg", data); - doc.generateAnImage("TestJoin_bevelRight3.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_bevelRight3.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_bevelRight3.bmp"), g_visualDebug); } TEST(TestJoin, bevelRight4) { @@ -314,8 +314,8 @@ TEST(TestJoin, bevelRight4) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_bevelRight4.svg", data); - doc.generateAnImage("TestJoin_bevelRight4.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_bevelRight4.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_bevelRight4.bmp"), g_visualDebug); } TEST(TestJoin, bevelLeft1) { @@ -325,8 +325,8 @@ TEST(TestJoin, bevelLeft1) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_bevelLeft1.svg", data); - doc.generateAnImage("TestJoin_bevelLeft1.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_bevelLeft1.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_bevelLeft1.bmp"), g_visualDebug); } TEST(TestJoin, bevelLeft2) { @@ -336,8 +336,8 @@ TEST(TestJoin, bevelLeft2) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_bevelLeft2.svg", data); - doc.generateAnImage("TestJoin_bevelLeft2.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_bevelLeft2.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_bevelLeft2.bmp"), g_visualDebug); } TEST(TestJoin, bevelLeft3) { @@ -347,8 +347,8 @@ TEST(TestJoin, bevelLeft3) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_bevelLeft3.svg", data); - doc.generateAnImage("TestJoin_bevelLeft3.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_bevelLeft3.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_bevelLeft3.bmp"), g_visualDebug); } TEST(TestJoin, bevelLeft4) { @@ -358,8 +358,8 @@ TEST(TestJoin, bevelLeft4) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_bevelLeft4.svg", data); - doc.generateAnImage("TestJoin_bevelLeft4.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_bevelLeft4.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_bevelLeft4.bmp"), g_visualDebug); } TEST(TestJoin, bevelCornerCasePath) { @@ -371,6 +371,6 @@ TEST(TestJoin, bevelCornerCasePath) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestJoin_bevelCornerCasePath.svg", data); - doc.generateAnImage("TestJoin_bevelCornerCasePath.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestJoin_bevelCornerCasePath.svg"), data); + doc.generateAnImage(etk::Path("TestJoin_bevelCornerCasePath.bmp"), g_visualDebug); } diff --git a/test/testLine.cpp b/test/testLine.cpp index 2a3567a..b305df0 100644 --- a/test/testLine.cpp +++ b/test/testLine.cpp @@ -15,8 +15,8 @@ TEST(TestLine, stroke) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestLine_stroke.svg", data); - doc.generateAnImage("TestLine_stroke.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestLine_stroke.svg"), data); + doc.generateAnImage(etk::Path("TestLine_stroke.bmp"), g_visualDebug); } diff --git a/test/testPath.cpp b/test/testPath.cpp index 5a85424..91e3c49 100644 --- a/test/testPath.cpp +++ b/test/testPath.cpp @@ -16,8 +16,8 @@ TEST(TestPath, fill) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestPath_fill.svg", data); - doc.generateAnImage("TestPath_fill.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestPath_fill.svg"), data); + doc.generateAnImage(etk::Path("TestPath_fill.bmp"), g_visualDebug); } TEST(TestPath, stroke) { @@ -28,8 +28,8 @@ TEST(TestPath, stroke) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestPath_stroke.svg", data); - doc.generateAnImage("TestPath_stroke.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestPath_stroke.svg"), data); + doc.generateAnImage(etk::Path("TestPath_stroke.bmp"), g_visualDebug); } TEST(TestPath, fill_and_stroke) { @@ -40,8 +40,8 @@ TEST(TestPath, fill_and_stroke) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestPath_fill_and_stroke.svg", data); - doc.generateAnImage("TestPath_fill_and_stroke.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestPath_fill_and_stroke.svg"), data); + doc.generateAnImage(etk::Path("TestPath_fill_and_stroke.bmp"), g_visualDebug); } TEST(TestPath, curveTo) { @@ -52,8 +52,8 @@ TEST(TestPath, curveTo) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestPath_curveTo.svg", data); - doc.generateAnImage("TestPath_curveTo.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestPath_curveTo.svg"), data); + doc.generateAnImage(etk::Path("TestPath_curveTo.bmp"), g_visualDebug); } @@ -66,8 +66,8 @@ TEST(TestPath, smoothCurveTo) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestPath_smoothCurveTo.svg", data); - doc.generateAnImage("TestPath_smoothCurveTo.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestPath_smoothCurveTo.svg"), data); + doc.generateAnImage(etk::Path("TestPath_smoothCurveTo.bmp"), g_visualDebug); } @@ -80,8 +80,8 @@ TEST(TestPath, bezierCurveTo) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestPath_bezierCurveTo.svg", data); - doc.generateAnImage("TestPath_bezierCurveTo.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestPath_bezierCurveTo.svg"), data); + doc.generateAnImage(etk::Path("TestPath_bezierCurveTo.bmp"), g_visualDebug); } @@ -94,8 +94,8 @@ TEST(TestPath, bezierSmoothCurveTo) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestPath_bezierSmoothCurveTo.svg", data); - doc.generateAnImage("TestPath_bezierSmoothCurveTo.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestPath_bezierSmoothCurveTo.svg"), data); + doc.generateAnImage(etk::Path("TestPath_bezierSmoothCurveTo.bmp"), g_visualDebug); } TEST(TestPath, arc) { @@ -114,8 +114,8 @@ TEST(TestPath, arc) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestPath_arc.svg", data); - doc.generateAnImage("TestPath_arc.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestPath_arc.svg"), data); + doc.generateAnImage(etk::Path("TestPath_arc.bmp"), g_visualDebug); } @@ -132,6 +132,6 @@ TEST(TestPath, end_path_border_case) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestPath_end_path_border_case.svg", data); - doc.generateAnImage("TestPath_end_path_border_case.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestPath_end_path_border_case.svg"), data); + doc.generateAnImage(etk::Path("TestPath_end_path_border_case.bmp"), g_visualDebug); } \ No newline at end of file diff --git a/test/testPolygon.cpp b/test/testPolygon.cpp index b65f987..a5f5045 100644 --- a/test/testPolygon.cpp +++ b/test/testPolygon.cpp @@ -15,8 +15,8 @@ TEST(TestPolygon, fill) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestPolygon_fill.svg", data); - doc.generateAnImage("TestPolygon_fill.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestPolygon_fill.svg"), data); + doc.generateAnImage(etk::Path("TestPolygon_fill.bmp"), g_visualDebug); } TEST(TestPolygon, stroke) { @@ -26,8 +26,8 @@ TEST(TestPolygon, stroke) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestPolygon_stroke.svg", data); - doc.generateAnImage("TestPolygon_stroke.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestPolygon_stroke.svg"), data); + doc.generateAnImage(etk::Path("TestPolygon_stroke.bmp"), g_visualDebug); } TEST(TestPolygon, fill_and_stroke) { @@ -37,6 +37,6 @@ TEST(TestPolygon, fill_and_stroke) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestPolygon_fill_and_stroke.svg", data); - doc.generateAnImage("TestPolygon_fill_and_stroke.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestPolygon_fill_and_stroke.svg"), data); + doc.generateAnImage(etk::Path("TestPolygon_fill_and_stroke.bmp"), g_visualDebug); } \ No newline at end of file diff --git a/test/testPolyline.cpp b/test/testPolyline.cpp index dfeade4..15783f9 100644 --- a/test/testPolyline.cpp +++ b/test/testPolyline.cpp @@ -17,8 +17,8 @@ TEST(TestPolyLine, fill) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestPolyLine_fill.svg", data); - doc.generateAnImage("TestPolyLine_fill.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestPolyLine_fill.svg"), data); + doc.generateAnImage(etk::Path("TestPolyLine_fill.bmp"), g_visualDebug); } TEST(TestPolyLine, stroke) { @@ -28,8 +28,8 @@ TEST(TestPolyLine, stroke) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestPolyLine_stroke.svg", data); - doc.generateAnImage("TestPolyLine_stroke.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestPolyLine_stroke.svg"), data); + doc.generateAnImage(etk::Path("TestPolyLine_stroke.bmp"), g_visualDebug); } TEST(TestPolyLine, fill_and_stroke) { @@ -39,8 +39,8 @@ TEST(TestPolyLine, fill_and_stroke) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestPolyLine_fill_and_stroke.svg", data); - doc.generateAnImage("TestPolyLine_fill_and_stroke.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestPolyLine_fill_and_stroke.svg"), data); + doc.generateAnImage(etk::Path("TestPolyLine_fill_and_stroke.bmp"), g_visualDebug); } diff --git a/test/testRectangle.cpp b/test/testRectangle.cpp index 08dbb51..2761005 100644 --- a/test/testRectangle.cpp +++ b/test/testRectangle.cpp @@ -15,8 +15,8 @@ TEST(TestRectangle, fill) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestRectangle_fill.svg", data); - doc.generateAnImage("TestRectangle_fill.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestRectangle_fill.svg"), data); + doc.generateAnImage(etk::Path("TestRectangle_fill.bmp"), g_visualDebug); } TEST(TestRectangle, stroke) { @@ -26,8 +26,8 @@ TEST(TestRectangle, stroke) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestRectangle_stroke.svg", data); - doc.generateAnImage("TestRectangle_stroke.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestRectangle_stroke.svg"), data); + doc.generateAnImage(etk::Path("TestRectangle_stroke.bmp"), g_visualDebug); } TEST(TestRectangle, fill_and_stroke) { @@ -37,8 +37,8 @@ TEST(TestRectangle, fill_and_stroke) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestRectangle_fill_and_stroke.svg", data); - doc.generateAnImage("TestRectangle_fill_and_stroke.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestRectangle_fill_and_stroke.svg"), data); + doc.generateAnImage(etk::Path("TestRectangle_fill_and_stroke.bmp"), g_visualDebug); } TEST(TestRectangle, corned_fill) { @@ -48,8 +48,8 @@ TEST(TestRectangle, corned_fill) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestRectangle_corned_fill.svg", data); - doc.generateAnImage("TestRectangle_corned_fill.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestRectangle_corned_fill.svg"), data); + doc.generateAnImage(etk::Path("TestRectangle_corned_fill.bmp"), g_visualDebug); } TEST(TestRectangle, corned_stroke) { @@ -59,8 +59,8 @@ TEST(TestRectangle, corned_stroke) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestRectangle_corned_stroke.svg", data); - doc.generateAnImage("TestRectangle_corned_stroke.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestRectangle_corned_stroke.svg"), data); + doc.generateAnImage(etk::Path("TestRectangle_corned_stroke.bmp"), g_visualDebug); } TEST(TestRectangle, corned_fill_and_stroke) { @@ -70,6 +70,6 @@ TEST(TestRectangle, corned_fill_and_stroke) { ""); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestRectangle_corned_fill_and_stroke.svg", data); - doc.generateAnImage("TestRectangle_corned_fill_and_stroke.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestRectangle_corned_fill_and_stroke.svg"), data); + doc.generateAnImage(etk::Path("TestRectangle_corned_fill_and_stroke.bmp"), g_visualDebug); } diff --git a/test/testStyle.cpp b/test/testStyle.cpp index 3f8c93e..6167e89 100644 --- a/test/testStyle.cpp +++ b/test/testStyle.cpp @@ -168,8 +168,8 @@ TEST(TestExtern, worddown) { "\n"); esvg::Document doc; doc.parse(data); - etk::FSNodeWriteAllData("TestExtern_worddown.svg", data); - doc.generateAnImage("TestExtern_worddown.bmp", g_visualDebug); + etk::uri::writeAll(etk::Path("TestExtern_worddown.svg"), data); + doc.generateAnImage(etk::Path("TestExtern_worddown.bmp"), g_visualDebug); } diff --git a/tools/converter.cpp b/tools/converter.cpp index e7090d6..ea6ef3f 100644 --- a/tools/converter.cpp +++ b/tools/converter.cpp @@ -42,6 +42,6 @@ int main(int _argc, const char *_argv[]) { } esvg::Document doc; doc.load(inputFile); - doc.generateAnImage(ivec2(512, 512), inputFile + ".bmp", visualTest); + doc.generateAnImage(ivec2(512, 512), etk::Path(inputFile + ".bmp"), visualTest); }