Commit e8c7e405 authored by Pascal Noisette's avatar Pascal Noisette

export : flush du buffer

parent 143a51ff
......@@ -165,6 +165,7 @@ void Svg::print(){
if (_buffer.str().size()>BUFFER_SIZE){
_svg_file.write(_buffer.str().c_str(), _buffer.str().size());
_buffer.flush();
_buffer.str("");
}
}
......
......@@ -19,6 +19,192 @@ int main()
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33);
s.draw_arrow(100,700,LEVEL*1,LEVEL*3);
s.draw_arrow(200,400,LEVEL*2,LEVEL*2);
s.end();
return 0;
......
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