Commit e805b628 authored by Olivier Lagrasse's avatar Olivier Lagrasse

- Remove GLUT dependency.

- Add the main rule for OpenGL and SVG.
- Correct some bugs.
- Statistic render is broken!
parent 46659383
......@@ -239,7 +239,7 @@ INCLUDE_DIRECTORIES(
ADD_EXECUTABLE(vite ${VITE_SRCS} ${VITE_MOC} ${VITE_RCC_SRCS})
TARGET_LINK_LIBRARIES(vite
${QT_LIBRARIES}
${GLUT_LIBRARIES}
# ${GLUT_LIBRARIES}
)
IF(VITE_ENABLE_OTF)
......
......@@ -128,7 +128,7 @@ Core::Core(int argc, char ** argv){
useGUI = true;
glutInit(&argc, argv);/* use for OpenGL text */
// glutInit(&argc, argv);/* use for OpenGL text */
/* Qt uses the default system encoding for QString (used when opening a file) */
QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale());
......
......@@ -556,35 +556,6 @@ void Interface_graphic::option_export_ok_pressed(){
_core->set_min_value_for_export(0);
_core->set_max_value_for_export(Info::Entity::x_max);//TO DO TODO max_size de la trace?
}
// We configure the svg exporter
double accuracy = convert_to_double(_ui_accuracy_export->text().toStdString());
double height = convert_to_double(_ui_grow_export->text().toStdString());
double wide = convert_to_double(_ui_wide_export->text().toStdString());
/*
if(_ui_more_options_export->isChecked()) {
if(accuracy >= 0. && _ui_CheckBox_accuracy_export->isChecked())
Svg::set_accuracy(accuracy);
else { // Default value
Svg::set_accuracy(0.);
}
if(height >= 0. && _ui_CheckBox_grow_export->isChecked())
Svg::set_height_factor(height);
else { // Default value
Svg::set_height_factor(20.);
}
if(wide >= 0. && _ui_CheckBox_wide_export->isChecked())
Svg::set_wide_factor(wide);
else { // Default value
Svg::set_wide_factor(100.);
}
}
else{ // Default values
Svg::set_accuracy(0.);
Svg::set_height_factor(20.);
Svg::set_wide_factor(100.);
}*/
_core->launch_action(Core::_STATE_EXPORT_FILE_IN_INTERVAL);
}
......
......@@ -62,11 +62,11 @@
//#include <GL/glew.h>/* For OpenGL VBO and shaders */
#ifdef __APPLE__
#include <GLUT/glut.h>/* For OpenGL text rendering */
#else
#include <GL/glut.h>/* For OpenGL text rendering */
#endif
//#ifdef __APPLE__
//#include <GLUT/glut.h>/* For OpenGL text rendering */
//#else
//#include <GL/glut.h>/* For OpenGL text rendering */
//#endif
#include <QtGui>
#include <QApplication>
......
......@@ -142,33 +142,33 @@ Geometry::~Geometry(){
Element_pos Geometry::screen_to_render_x(Element_pos e){
return e * (Element_pos)Info::Render::width / (Element_pos)Info::Screen::width;
return e * coeff_screen_render_x();
}
Element_pos Geometry::screen_to_render_y(Element_pos e){
return e * (Element_pos)Info::Render::height / (Element_pos)Info::Screen::height;
return e * coeff_screen_render_y();
}
Element_pos Geometry::render_to_trace_x(Element_pos e){
return (e - _default_entity_x_translate + _x_state_translate) *
(Info::Entity::x_max - Info::Entity::x_min) / ((Info::Render::width - _default_entity_x_translate) * _x_state_scale);
return (e - _default_entity_x_translate + _x_state_translate) /
coeff_trace_render_x();
}
Element_pos Geometry::render_to_trace_y(Element_pos e){
return (e-_ruler_y-_ruler_height + _y_state_translate) *
(Info::Container::y_max - Info::Container::y_min) / ((Info::Render::height - _ruler_height) * _y_state_scale);
return (e-_ruler_y-_ruler_height + _y_state_translate) /
coeff_trace_render_y();
}
Element_pos Geometry::render_to_screen_x(Element_pos e){
return e * (Element_pos)Info::Screen::width / (Element_pos)Info::Render::width;
return e / coeff_screen_render_x();
}
Element_pos Geometry::render_to_screen_y(Element_pos e){
return e * (Element_pos)Info::Screen::height / (Element_pos)Info::Render::height;
return e / coeff_screen_render_y();
}
Element_pos Geometry::trace_to_render_x(Element_pos e){
......@@ -183,6 +183,15 @@ Element_pos Geometry::trace_to_render_y(Element_pos e){
_ruler_y + _ruler_height - _y_state_translate;
}
Element_pos Geometry::coeff_screen_render_x(){
return (Element_pos)Info::Render::width / (Element_pos)Info::Screen::width;
}
Element_pos Geometry::coeff_screen_render_y(){
return (Element_pos)Info::Render::height / (Element_pos)Info::Screen::height;
}
Element_pos Geometry::coeff_trace_render_x(){
return ((Info::Render::width-_default_entity_x_translate)*_x_state_scale) / (Info::Entity::x_max - Info::Entity::x_min);
......@@ -192,3 +201,10 @@ Element_pos Geometry::coeff_trace_render_y(){
return ((Info::Render::height-_ruler_height)*_y_state_scale) / (Info::Container::y_max - Info::Container::y_min);
}
void Geometry::update_visible_interval_value(){
Info::Render::_x_min_visible = max(Info::Entity::x_min, (_x_state_translate - _default_entity_x_translate)/coeff_trace_render_x());
Info::Render::_x_max_visible = min(Info::Entity::x_max, (_x_state_translate - _default_entity_x_translate + Info::Render::width)/coeff_trace_render_x());
}
......@@ -316,6 +316,18 @@ public:
*/
Element_pos trace_to_render_y(Element_pos e);
/*!
* \brief Return the coefficient used to convert from horizontal screen scale to the horizontal render scale by multiplication.
* \return A number with which an horizontal screen width number must be multiply to get its horizontal render width.
*/
Element_pos coeff_screen_render_x();
/*!
* \brief Return the coefficient used to convert from vertical screen scale to the vertical render scale by multiplication.
* \return A number with which a vertical screen height number must be multiply to get its vertical render height.
*/
Element_pos coeff_screen_render_y();
/*!
* \brief Return the coefficient used to convert from horizontal trace scale to the horizontal render scale by multiplication.
* \return A number with which an horizontal trace width number must be multiply to get its horizontal render width.
......@@ -328,6 +340,11 @@ public:
*/
Element_pos coeff_trace_render_y();
/*!
* \brief This function updates the visible interval value.
*/
void update_visible_interval_value();
};
......
......@@ -62,8 +62,6 @@ const int Hook_event::DRAWING_STATE_WAITING = 1;
const int Hook_event::DRAWING_STATE_DRAWING = 2;
const int Hook_event::_ctrl_scroll_factor = 10;
const int Hook_event::_ctrl_zoom_factor = 3;
const int Hook_event::DRAWING_TIMER_DEFAULT = 10;
/***********************************
......@@ -106,14 +104,7 @@ Hook_event::Hook_event(Render_opengl* render_instance, Core* core, QWidget *pare
_state = DRAWING_STATE_WAITING;/* At the beginning, no trace is drawing */
/* init the wait animation */
_wait_list = 0;
_wait_angle = 0.0f; /* begin with 0 rad angle */
_wait_angle_y = 0.0f; /* begin with 0 rad angle */
_wait_timer = NULL;
_wait_spf = DRAWING_TIMER_DEFAULT;/* DRAWING_TIMER_DEFAULT milliseconds per frame */
/* init main informations about OpenGL scene and QGLWidget size */
Info::Screen::width = width(); /* get the QGLWidget visibled width (in pixel) */
......@@ -136,7 +127,6 @@ Hook_event::Hook_event(Render_opengl* render_instance, Core* core, QWidget *pare
/* Info init */
// Info::Render::_key_alt = false;/* no CTRL key pushed */
_list_ruler = 0;
setAutoFillBackground(false);
......@@ -149,19 +139,6 @@ Hook_event::Hook_event(Render_opengl* render_instance, Core* core, QWidget *pare
Hook_event::~Hook_event(){
/* Release the Rabbit and ruler lists */
if (glIsList(_wait_list) == GL_TRUE)
glDeleteLists(_wait_list, 1);
if (glIsList(_list_ruler) == GL_TRUE)
glDeleteLists(_list_ruler, 1);
/* Release timer (for Rabbit rotate) */
if (_wait_timer != NULL){
delete _wait_timer;
_wait_timer=NULL;
}
}
......@@ -243,65 +220,21 @@ void Hook_event::mousePressEvent(QMouseEvent * event){
void Hook_event::mouseDoubleClickEvent ( QMouseEvent * event ){
Element_pos x_click, y_click;/* Store the OpenGL scene point where user had clicked */
Element_pos x_result, y_result;/* The click coordinates for the Data Structure. */
if( Qt::LeftButton == event->button() ){
/*
* Now determine where the user had clicked
*/
x_click = _mouse_x * (Element_pos)Info::Render::width/(Element_pos)Info::Screen::width;/* x position of the click in the OpenGL scene */
y_click = _mouse_y * (Element_pos)Info::Render::height/(Element_pos)Info::Screen::height;/* y position of the click in the OpenGL scene */
/*
* First, check the y position if user clicks on the ruler or other
*/
if (y_click <= (_ruler_height+_ruler_y))/* user had clicked on the ruler */
return;
/* Work out the y value in Data Structure coordinates */
y_result = y_click-(_ruler_y+_ruler_height) + _y_state_translate;
y_result *= (Info::Container::y_max-Info::Container::y_min)/((Info::Render::height-_ruler_height)*_y_state_scale);
/*
* Second, check the x position if user click on the container or other
*/
if (x_click <= (_x_scale_container_state*Info::Render::width) ){/* user had clicked on the container */
return;
}
else{
/*
* Determine the time corresponding to the x click position.
* It is equal to the x click position in the OpenGL render area minus the default translation of entities.
* Also, near the container area time is 0 except if a translation had occured.
* So add the state translate and the x_result will be obtained.
*
* Take care that x_result can be negative.
*/
x_result = (x_click - _default_entity_x_translate + _x_state_translate);
/*
* To convert from [0;Info::Render::width*_state_scale] to [_state_x_min;_state_x_max]
*/
// x_result *= (_state_x_max - _state_x_min)/((Info::Render::width-_default_entity_x_translate)*_x_state_scale);
x_result /= coeff_trace_render_x();
x_result = render_to_trace_x(screen_to_render_x(_mouse_x));
y_result = render_to_trace_y(screen_to_render_y(_mouse_y));
Info::Render::_info_x = x_result;
Info::Render::_info_y = y_result;
Info::Render::_info_accurate = 1/coeff_trace_render_x();//(_state_x_max - _state_x_min)/((Info::Render::width-_default_entity_x_translate)*_x_state_scale);//_state_x_max/Info::Render::width;
Info::Render::_info_accurate = 1/coeff_trace_render_x();
_core->launch_action(_core->_STATE_RENDER_DISPLAY_INFORMATION, NULL);
}/* end else of if (x_click...) */
_mouse_pressed = false;
_render_instance->updateGL();
_mouse_pressed = false;
_render_instance->updateGL();
}
return;
}
......@@ -419,16 +352,16 @@ void Hook_event::apply_zoom_box(Element_pos x_min, Element_pos x_max, Element_po
*
* Work out the new selection middle position after applying the scale.
*/
x_scaled_middle_selection = (x_middle_selection + _x_state_translate /*- _default_entity_x_translate*/)*(Info::Screen::width/((x_max - x_min)));
y_scaled_middle_selection = (y_middle_selection + _y_state_translate /*- _ruler_height*/ )*(Info::Screen::height/((y_max - y_min)));
x_scaled_middle_selection = (x_middle_selection + _x_state_translate - _default_entity_x_translate)*(Info::Screen::width/((x_max - x_min)));
y_scaled_middle_selection = (y_middle_selection + _y_state_translate - _ruler_height )*(Info::Screen::height/((y_max - y_min)));
/*
* 2nd step:
*
* Work out the distance between the state origin and the render area middle (Info::Render::width/2).
*/
x_distance_between_state_origin_and_render_middle = _x_state_translate /*- _default_entity_x_translate*/ + Info::Render::width/2;
y_distance_between_state_origin_and_render_middle = _y_state_translate /*- _ruler_height*/ + Info::Render::height/2;
x_distance_between_state_origin_and_render_middle = _x_state_translate - _default_entity_x_translate + Info::Render::width/2;
y_distance_between_state_origin_and_render_middle = _y_state_translate - _ruler_height + Info::Render::height/2;
/*
* 3rd step:
......@@ -737,76 +670,5 @@ void Hook_event::change_scale_container_state(int view_size){
_render_instance->updateGL();
}
void Hook_event::update_visible_interval_value(){
Info::Render::_x_min_visible = max(Info::Entity::x_min, (_x_state_translate - _default_entity_x_translate)/coeff_trace_render_x());//(_x_state_scale*((Info::Render::width-_default_entity_x_translate)/(_state_x_max-_state_x_min)) ));
Info::Render::_x_max_visible = min(Info::Entity::x_max, (_x_state_translate - _default_entity_x_translate + Info::Render::width)/coeff_trace_render_x());///(_x_state_scale*((Info::Render::width-_default_entity_x_translate)/(_state_x_max-_state_x_min)) ));
}
/***********************************
*
*
*
* Coordinate convert functions.
*
*
*
**********************************/
/*
Element_pos Hook_event::screen_to_render_x(Element_pos e){
return e * (Element_pos)Info::Render::width / (Element_pos)Info::Screen::width;
}
Element_pos Hook_event::screen_to_render_y(Element_pos e){
return e * (Element_pos)Info::Render::height / (Element_pos)Info::Screen::height;
}
Element_pos Hook_event::render_to_trace_x(Element_pos e){
return (e - _default_entity_x_translate + _x_state_translate) *
(_state_x_max - _state_x_min) / ((Info::Render::width - _default_entity_x_translate) * _x_state_scale);
}
Element_pos Hook_event::render_to_trace_y(Element_pos e){
return (e-_ruler_y-_ruler_height + _y_state_translate) *
(Info::Container::y_max - Info::Container::y_min) / ((Info::Render::height - _ruler_height) * _y_state_scale);
}
Element_pos Hook_event::render_to_screen_x(Element_pos e){
return e * (Element_pos)Info::Screen::width / (Element_pos)Info::Render::width;
}
Element_pos Hook_event::render_to_screen_y(Element_pos e){
return e * (Element_pos)Info::Screen::height / (Element_pos)Info::Render::height;
}
Element_pos Hook_event::trace_to_render_x(Element_pos e){
return e * coeff_trace_render_x() +
_default_entity_x_translate - _x_state_translate;
}
Element_pos Hook_event::trace_to_render_y(Element_pos e){
return e *coeff_trace_render_y() +
_ruler_y + _ruler_height - _y_state_translate;
}
Element_pos Hook_event::coeff_trace_render_x(){
return ((Info::Render::width-_default_entity_x_translate)*_x_state_scale) / (_state_x_max - _state_x_min);
}
Element_pos Hook_event::coeff_trace_render_y(){
return ((Info::Render::height-_ruler_height)*_y_state_scale) / (Info::Container::y_max-Info::Container::y_min);
}
*/
......@@ -252,70 +252,6 @@ protected:
*/
static const int _ctrl_zoom_factor;
/***********************************
*
* The wait screen drawing.
*
**********************************/
/***********************************
* The wait list Attributes.
**********************************/
/*!
* \brief Rotation angle for the wait.
*/
float _wait_angle;
/*!
* \brief Y rotation angle for the wait.
*/
float _wait_angle_y;
/*!
* \brief Time in ms between two frames for the waiting screen.
*/
static const int DRAWING_TIMER_DEFAULT;
/*!
* \brief Wait animation seconds per frame.
*/
int _wait_spf;
/*!
* \brief Timer to animate the wait.
*/
QTimer* _wait_timer;
/***********************************
*
* The trace drawing.
*
**********************************/
/***********************************
* The drawing list Attributes.
**********************************/
/*!
* \brief The waiting screen display list.
*/
GLuint _wait_list;
/*!
* \brief The ruler display list.
*/
GLuint _list_ruler;
/***********************************
*
* Default QWidget functions.
......@@ -471,11 +407,6 @@ public:
*/
void change_scale_container_state(int view_size);/* temporary -> to change the size of container view */
/*!
* \brief This function updates the visible interval value (for export).
*/
void update_visible_interval_value();
/*!
* \brief Scale the current view to the zoom box shape.
* \param x_min the x minimum position.
......
......@@ -49,6 +49,7 @@
//#include "render/Render_opengl_dl.hpp"
#include "render/Geometry.hpp"
#include "render/Ruler.hpp"
#include "common/info.hpp"
......@@ -285,6 +286,7 @@ public:
*/
inline void start_draw_arrows(){
drawing_instance->start_draw_arrows();
drawing_instance->set_color(1, 1, 0);
}
/*!
......@@ -425,10 +427,43 @@ public:
* \brief Do nothing (it is present for compatibility of the Render class).
*/
inline void end_draw(){
/* Now, draw ruler */
Element_pos graduation_diff;
Element_pos coeff_prefix;
std::ostringstream buf_txt;
/* Update Info::Render::_x_min_visible and Info::Render::_x_max_visible values */
update_visible_interval_value();
graduation_diff = Ruler::get_graduation_diff(Info::Render::_x_min_visible, Info::Render::_x_max_visible);
coeff_prefix = Ruler::get_coeff_for_common_prefix(Info::Render::_x_min_visible, Info::Render::_x_max_visible);
drawing_instance->start_ruler();
drawing_instance->set_color(1, 0, 0);
for (Element_pos i = Info::Render::_x_min_visible ; i < Info::Render::_x_max_visible ; i+=graduation_diff){
const Element_pos grad_div_by_5 = graduation_diff/5;
for (Element_pos j = (i+grad_div_by_5) ; j<(i+graduation_diff) ; j+= grad_div_by_5){
drawing_instance->draw_line( trace_to_render_x(j), 0,
trace_to_render_x(j), 2, _z_ruler);
}
drawing_instance->draw_line( trace_to_render_x(i), 0,
trace_to_render_x(i), 4, _z_ruler);
buf_txt.str("");/* flush the buffer */
buf_txt << Ruler::get_variable_part(i, coeff_prefix, 2);
drawing_instance->draw_text(trace_to_render_x(i)+1, 4, _z_ruler, buf_txt.str());
}
drawing_instance->end_ruler();
/* clear vectors */
_containers.clear();
_container_texts.clear();
drawing_instance->end_draw();
}
};
......
This diff is collapsed.
......@@ -93,15 +93,11 @@ protected:
*/
Core* _core;
/***********************************
*
* The wait screen drawing.
*
**********************************/
/***********************************
* The wait list Attributes.
**********************************/
/*!
* \brief The waiting screen display list.
*/
GLuint _wait_list;
/*!
* \brief The container GLu list.
......@@ -131,6 +127,42 @@ protected:
std::vector<Circle_> _circles;
/***********************************
*
* The wait screen drawing.
*
**********************************/
/***********************************
* The wait list Attributes.
**********************************/
/*!
* \brief Rotation angle for the wait.
*/
float _wait_angle;
/*!
* \brief Y rotation angle for the wait.
*/
float _wait_angle_y;
/*!
* \brief Time in ms between two frames for the waiting screen.
*/
static const int DRAWING_TIMER_DEFAULT;
/*!
* \brief Wait animation seconds per frame.
*/
int _wait_spf;
/*!
* \brief Timer to animate the wait.
*/
QTimer* _wait_timer;
public:
/***********************************
......@@ -186,7 +218,7 @@ public:
/*!
* \brief Call by the system each time the render area need to be updated.
*/
void paintGL();
void paintGL();
......@@ -327,6 +359,17 @@ public:
*/
void end_draw_counter();
/*!
* \brief Called before ruler drawing.
*/
void start_ruler();
/*!
* \brief Called after ruler drawing.
*/
void end_ruler();
/*!
* \brief Do nothing (it is present for compatibility of the Render class).
*/
......@@ -346,12 +389,6 @@ public:
*/
GLuint draw_wait();
/*!
* \brief Create the ruler display list.
* \return Asset value of the ruler.
*/
GLuint draw_ruler();
/*!
* \brief Draw the ruler display list.
*/
......@@ -501,6 +538,7 @@ public:
void draw_stored_circles();
void draw_stored_texts();
void paintEvent(QPaintEvent *);
};
......
......@@ -96,7 +96,7 @@ void Render_svg::set_color(float r, float g, float b){
_blue = b;
}
void Render_svg::draw_text(const Element_pos x, const Element_pos y, const Element_pos z, const std::string s){
void Render_svg::draw_text(const Element_pos x, const Element_pos y, const Element_pos , const std::string s){
_buffer.str("");
_buffer << "<text x=\"" << render_to_screen_x(x) <<"\""
<< " y=\"" << render_to_screen_y(y) << "\""
......@@ -109,9 +109,19 @@ void Render_svg::draw_text(const Element_pos x, const Element_pos y, const Eleme
}
void Render_svg::draw_quad(Element_pos x, Element_pos y, Element_pos z, Element_pos w, Element_pos h){
void Render_svg::draw_quad(Element_pos x, Element_pos y, Element_pos , Element_pos w, Element_pos h){
const Element_pos x_min = trace_to_render_x(Info::Render::_x_min_visible);
const Element_pos x_max = trace_to_render_x(Info::Render::_x_max_visible);
if (render_to_screen_x(w) < 1)/* less than 1 pixel */
return;
if ((x+w) < x_min)
return;
if (x > x_max)
return;
// std::cout << __FILE__ << " " << __LINE__ << " - " << x << " " << << std::endl;
_buffer.str("");
_buffer << "<rect "
......@@ -119,7 +129,7 @@ void Render_svg::draw_quad(Element_pos x, Element_pos y, Element_pos z, Element_
<< " y=\"" << render_to_screen_y(y) << "\""
<< " width=\"" << render_to_screen_x(w) << "\""
<< " height=\"" << render_to_screen_y(h) << "\""
<< " fill=\"rgb(" << _red*256 << "," << _green*256 << "," << _blue*256 << ")\""/* TODO: choice better scale than '*256' */
<< " fill=\"rgb(" << floor(_red*256) << "," << floor(_green*256) << "," << floor(_blue*256) << ")\""/* TODO: choice better scale than '*256' */
<< " style=\"stroke:white;stroke-width:0.05\""
<< " />\n";
......@@ -127,7 +137,7 @@ void Render_svg::draw_quad(Element_pos x, Element_pos y, Element_pos z, Element_
}
void Render_svg::draw_triangle(Element_pos x, Element_pos y,
Element_pos size, Element_pos r){
Element_pos , Element_pos r){
_buffer.str("");
_buffer << "<polygon points=\""
<< render_to_screen_x(x) << "," << render_to_screen_y(y) << ","
......@@ -140,7 +150,7 @@ void Render_svg::draw_triangle(Element_pos x, Element_pos y,
_output_file.write(_buffer.str().c_str(), _buffer.str().size());
}
void Render_svg::draw_line(Element_pos x1, Element_pos y1, Element_pos x2, Element_pos y2, Element_pos z){
void Render_svg::draw_line(Element_pos x1, Element_pos y1, Element_pos x2, Element_pos y2, Element_pos ){
_buffer.str("");
_buffer << "<line "
<< " x1=\"" << render_to_screen_x(x1) << "\""
......@@ -153,7 +163,7 @@ void Render_svg::draw_line(Element_pos x1, Element_pos y1, Element_pos x2, Eleme
_output_file.write(_buffer.str().c_str(), _buffer.str().size());
}
void Render_svg::draw_circle(Element_pos x, Element_pos y, Element_pos z, Element_pos r){
void Render_svg::draw_circle(Element_pos x, Element_pos y, Element_pos , Element_pos r){
_buffer.str("");
_buffer << "<circle "
<< "cx=\"" << render_to_screen_x(x) << "\""
......@@ -167,27 +177,26 @@ void Render_svg::draw_circle(Element_pos x, Element_pos y, Element_pos z, Elemen
void Render_svg::start_draw(){
const unsigned int w = (unsigned int)(Info::Entity::x_max - Info::Entity::x_min);
_buffer.str("");
_buffer << "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n"
<< "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n"
<< "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"" << Info::Screen::width << "\" height=\"" << Info::Screen::height << "\">\n";
<< "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"" << Info::Screen::width << "\" height=\"" << Info::Screen::height << "\" >\n"
<< "<rect "
<< " x=\"0\" y=\"0\""
<< " width=\"" << Info::Screen::width << "\" height=\"" << Info::Screen::height << "\""
<< " fill=\"rgb(128, 128, 150)\""
<< " />\n";
_output_file.write(_buffer.str().c_str(), _buffer.str().size());
}
void Render_svg::start_draw_containers(){
/* _buffer.str("");
_buffer << "<g transform=\"scale(" << 10 << "," << 800/(Info::Container::y_max-Info::Container::y_min) << "\">\n";
std::cout << __FILE__ << " !! " << __LINE__ << " " << 600/(Info::Entity::x_max - Info::Entity::x_min) << " " << 800/(Info::Container::y_max-Info::Container::y_min) << std::endl;
_output_file.write(_buffer.str().c_str(), _buffer.str().size()); */
}