[DEV] integrate the new interface of URI and file

This commit is contained in:
Edouard DUPIN 2018-09-24 23:26:06 +02:00
parent e060e381b1
commit 38e338d731
21 changed files with 284 additions and 271 deletions

View File

@ -6,7 +6,8 @@
#include <esvg/debug.hpp>
#include <esvg/Renderer.hpp>
#include <etk/os/FSNode.hpp>
#include <etk/uri/Uri.hpp>
#include <etk/uri/provider/provider.hpp>
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<sizeX*sizeY; iii++) {
etk::Color<uint8_t,3> 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();
}

View File

@ -10,6 +10,7 @@
#include <etk/Color.hpp>
#include <esvg/render/Weight.hpp>
#include <esvg/render/DynamicColor.hpp>
#include <etk/uri/uri.hpp>
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<float,4> mergeColor(etk::Color<float,4> _base, etk::Color<float,4> _integration);
public:

View File

@ -20,7 +20,7 @@
#include <esvg/RadialGradient.hpp>
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<etk::Color<uint8_t,3>> 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;
}

View File

@ -8,7 +8,7 @@
#include <etk/types.hpp>
#include <etk/Vector.hpp>
#include <etk/math/Vector2D.hpp>
#include <etk/os/FSNode.hpp>
#include <etk/uri/uri.hpp>
#include <esvg/Base.hpp>
@ -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

View File

@ -6,6 +6,7 @@
#include <esvg/render/Weight.hpp>
#include <esvg/debug.hpp>
#include <etk/algorithm.hpp>
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;

View File

@ -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

View File

@ -7,6 +7,8 @@
*/
#include <etk/types.hpp>
#include <etk/uri/uri.hpp>
#pragma once

View File

@ -16,8 +16,8 @@ TEST(TestCap, butt) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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);
}

View File

@ -15,8 +15,8 @@ TEST(TestCircle, fill) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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);
}

View File

@ -15,8 +15,8 @@ TEST(TestColor, blending) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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);
}

View File

@ -15,8 +15,8 @@ TEST(TestEllipse, fill) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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);
}

View File

@ -23,8 +23,8 @@ TEST(TestGradientLinear, horizontal) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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);
}

View File

@ -23,8 +23,8 @@ TEST(TestGradientRadial, circle) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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) {
"</svg>\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);
}

View File

@ -17,8 +17,8 @@ TEST(TestJoin, miterRight1) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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);
}

View File

@ -15,8 +15,8 @@ TEST(TestLine, stroke) {
"</svg>");
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);
}

View File

@ -16,8 +16,8 @@ TEST(TestPath, fill) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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);
}

View File

@ -15,8 +15,8 @@ TEST(TestPolygon, fill) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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);
}

View File

@ -17,8 +17,8 @@ TEST(TestPolyLine, fill) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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);
}

View File

@ -15,8 +15,8 @@ TEST(TestRectangle, fill) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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) {
"</svg>");
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);
}

View File

@ -168,8 +168,8 @@ TEST(TestExtern, worddown) {
"</svg>\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);
}

View File

@ -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);
}