Commit 143a51ff authored by Pascal Noisette's avatar Pascal Noisette

message_ns::message dans l'export

parent 34712093
#include "render_svg.hpp"
#include "../message/message_ns.hpp"
using namespace std;
void Svg::init(const char *path){
_svg_file.open(path , std::ofstream::out | std::ofstream::trunc);
if (_svg_file.is_open()==false){
std::cerr<<"unable to open file";
#ifdef TEST_SVG_MODE
std::cerr<<"unable to open file";
#else
// message_ns::message << "unable to open file " << message_ns::ende;
#endif
}
#ifndef TEST_SVG_MODE
//message_ns::message << "openning " << message_ns::endi;
#endif
#ifdef TEST_SVG_MODE
std::cout<< "openning " << path << endl;
#else
//message_ns::message << "openning " << message_ns::endi;
#endif
_buffer << "<?xml version='1.0' encoding='utf-8' standalone='no'?>\n"
<< "<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 20010904//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>\n"
<< "<svg xmlns='http://www.w3.org/2000/svg' x='0' y='0' width='1280' height='728' id='svg2'>\n"
......@@ -34,4 +51,13 @@ void Svg::end(){
_svg_file.write(_buffer.str().c_str(), _buffer.str().size());
_buffer.flush();
_svg_file.close();
#ifdef TEST_SVG_MODE
std::cout<< "output written" << endl;
#else
//message_ns::message << "output written" << message_ns::endi;
#endif
}
test_svg.o : test_svg.cpp
render_svg.o: ../../src/interface/render_svg.cpp ../../src/interface/render_svg.hpp
g++ -g -c -Wall ../../src/interface/render_svg.cpp -o render_svg.o
g++ -DTEST_SVG_MODE -g -c -Wall ../../src/interface/render_svg.cpp -o render_svg.o
test_svg : render_svg.o test_svg.o
g++ -g -o test_svg render_svg.o test_svg.o
\ No newline at end of file
g++ -DTEST_SVG_MODE -g -o test_svg render_svg.o test_svg.o
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment