Commit 313b4780 authored by Pascal Noisette's avatar Pascal Noisette

source/src/interface/render_svg.cpp counter

parent 471f7878
...@@ -67,7 +67,7 @@ class Render ...@@ -67,7 +67,7 @@ class Render
virtual void start_draw_counter() = 0; virtual void start_draw_counter() = 0;
virtual void draw_counter(const Element_pos x, const Element_pos y) = 0; virtual void draw_counter(const Element_pos x, const Element_pos y) = 0;
virtual void end_draw_counter() = 0; virtual void end_draw_counter() = 0;
......
...@@ -324,9 +324,9 @@ class Render_area : public QGLWidget, public Render ...@@ -324,9 +324,9 @@ class Render_area : public QGLWidget, public Render
void start_draw_counter(); void start_draw_counter();
void draw_counter(const Element_pos x, const Element_pos y); void draw_counter(const Element_pos x, const Element_pos y);
void end_draw_counter(); void end_draw_counter();
void end_draw(); void end_draw();
......
...@@ -40,6 +40,10 @@ void Svg::init(const char *path){ ...@@ -40,6 +40,10 @@ void Svg::init(const char *path){
<< "\t\t\t{\n" << "\t\t\t{\n"
<< "\t\t\t\tfill:black;stroke:black;stroke-width:1\n" << "\t\t\t\tfill:black;stroke:black;stroke-width:1\n"
<< "\t\t\t}\n" << "\t\t\t}\n"
<< "\t\tpath\n"
<< "\t\t\t{\n"
<< "\t\t\t\tfill:green;stroke:black;stroke-width:1\n"
<< "\t\t\t}\n"
<< "\t</style>\n" << "\t</style>\n"
<< "\t<desc>Rectangles</desc>\n"; << "\t<desc>Rectangles</desc>\n";
......
...@@ -26,6 +26,7 @@ class Svg : public Render{ ...@@ -26,6 +26,7 @@ class Svg : public Render{
private: private:
std::ostringstream _buffer; std::ostringstream _buffer;
std::ostringstream _chronogramme;
std::ofstream _svg_file; std::ofstream _svg_file;
inline void print(); inline void print();
inline void rectangle(const char* name,unsigned long w, unsigned long h,unsigned long x1,unsigned long y1, unsigned int r, unsigned int g, unsigned int b ); inline void rectangle(const char* name,unsigned long w, unsigned long h,unsigned long x1,unsigned long y1, unsigned int r, unsigned int g, unsigned int b );
...@@ -82,7 +83,7 @@ public: ...@@ -82,7 +83,7 @@ public:
void start_draw_counter(); void start_draw_counter();
void draw_counter(const Element_pos x, const Element_pos y); void draw_counter(const Element_pos x, const Element_pos y);
void end_draw_counter(); void end_draw_counter();
...@@ -103,6 +104,7 @@ public: ...@@ -103,6 +104,7 @@ public:
inline void Svg::start_draw(){ inline void Svg::start_draw(){
} }
inline void Svg::draw_container_text(const Element_pos x, const Element_pos y, const std::string value){ inline void Svg::draw_container_text(const Element_pos x, const Element_pos y, const std::string value){
...@@ -196,7 +198,7 @@ inline void Svg::draw_state(const Element_pos start , const Element_pos end, con ...@@ -196,7 +198,7 @@ inline void Svg::draw_state(const Element_pos start , const Element_pos end, con
} }
inline void Svg::draw_event(const Element_pos time, const Element_pos height, const Element_pos container_height){ inline void Svg::draw_event(const Element_pos time, const Element_pos height, const Element_pos container_height){
//rectangle(1,container_height*LEVEL, time, container_height, 0xff, 0x44, 0xcc); Svg::rectangle("event",MARGIN,container_height, time, height, 0xff, 0xff, 0xff);
} }
#endif // RENDER_SVG #endif // RENDER_SVG
...@@ -22,187 +22,9 @@ int main() ...@@ -22,187 +22,9 @@ int main()
s.draw_state(100, 750, 1,NULL, 0xff,0xcc,33); s.draw_event(200,LEVEL*1,100);
s.draw_state(400, 750, 2,NULL, 0xff,0xcc,33); s.draw_event(220,LEVEL*1,100);
s.draw_state(70, 300, 3,NULL, 0xff,0xcc,33); s.draw_event(320,LEVEL*1,100);
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(); s.end();
......
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