Commit 4da11064 authored by Olivier Lagrasse's avatar Olivier Lagrasse

Resolution probleme d'echelle dans render area. Version 0.2 ok

parent ce87ab23
......@@ -212,7 +212,15 @@ void Interface_graphic::on_open_triggered(){
if(_is_rendering_trace == true){/* Realease the previous trace */
warning("Cannot opening an other file");
/* QString program = QString(get_current_dir_name())+QString("/vite");
cerr << get_current_dir_name() << endl;
QStringList arguments;
arguments << filename.toStdString().c_str();
QProcess *myProcess = new QProcess(NULL);
myProcess->start(program, arguments); */
}
else{
opening_file(filename.toStdString());
......
......@@ -113,7 +113,7 @@ void Render_area::initializeGL(){
glClearColor(0.5f, 0.5f, 0.55f, 1.0f);
glEnable(GL_DEPTH_TEST);
glClearStencil(0);
_wait_list = draw_wait();
......@@ -188,7 +188,6 @@ void Render_area::paintGL(){
case DRAWING_STATE_DRAWING:/* A trace is drawn */
glMatrixMode(GL_MODELVIEW);
......@@ -268,8 +267,10 @@ void Render_area::paintGL(){
glPushMatrix();
glTranslated( _render_width*_x_scale_container_state-_state_translate , 0.0f, _z_state);
glScalef( _state_scale*(_render_width/_state_x_max), _render_height/_state_y_max, 0.0f);
//glScalef( _state_scale*(_render_width/_state_x_max), _render_height/_state_y_max, 0.0f);
glScalef( _state_scale*(_render_width/_state_x_max), _render_height/_container_y_max, 0.0f);
if (glIsList(_list_states)==GL_FALSE)
message << "ERROR LIST not exist for states." << ende;
......@@ -282,7 +283,7 @@ void Render_area::paintGL(){
glPushMatrix();
glTranslated( _render_width*_x_scale_container_state-_state_translate , 0.0f, _z_counter);
glScalef( _state_scale*(_render_width/_state_x_max), _render_height/_state_y_max, 0.0f);
glScalef( _state_scale*(_render_width/_state_x_max), _render_height/_container_y_max, 0.0f);
if (glIsList(_list_counters)==GL_FALSE)
message << "ERROR LIST not exist for counters." << ende;
......
......@@ -618,7 +618,7 @@ inline void Render_area::draw_stored_arrows(std::vector<Arrow_> &arrows){
/* Manage the event drawing size from state size and render area dimensions */
Element_pos arrow_scale_x = _state_scale*(_render_width/_state_x_max);
Element_pos arrow_scale_y = _render_height/_state_y_max;
Element_pos arrow_scale_y = _render_height/_container_y_max;
Element_pos angle;
......@@ -698,7 +698,7 @@ inline void Render_area::draw_stored_events(std::vector<Event_> &events){
/* Manage the event drawing size from state size and render area dimensions */
Element_pos event_scale_x = _state_scale*(_render_width/_state_x_max);
Element_pos event_scale_y = _render_height/_state_y_max;
Element_pos event_scale_y = _render_height/_container_y_max;
Element_pos radius;/* the circle radius */
Element_pos angle;
......
......@@ -154,7 +154,7 @@ inline void Svg::end_draw_states(){
inline void Svg::start_draw_counter(){
_chronogramme_state=INIT;
std::cout<<"INIT\n";
// std::cout<<"INIT\n";
}
inline void Svg::draw_counter(const Element_pos x, const Element_pos y){
......@@ -163,13 +163,13 @@ inline void Svg::draw_counter(const Element_pos x, const Element_pos y){
Element_pos yprime = y*LEVEL;
Element_pos switchvalue = _container_width_max;
std::cout<<"s.draw_counter("<<xprime<<","<<yprime<<");\n";
//std::cout<<"s.draw_counter("<<xprime<<","<<yprime<<");\n";
if (_chronogramme_state==INIT)
{
if (xprime==switchvalue)
{
std::cout<<"WAITFORPOINT\n";
// std::cout<<"WAITFORPOINT\n";
_chronogramme << "\n<path d='M"<< xprime << " " << yprime;
_chronogramme_state=WAIT_FOR_POINT;
}
......@@ -183,7 +183,7 @@ std::cout<<"s.draw_counter("<<xprime<<","<<yprime<<");\n";
if (xprime==switchvalue)
{
std::cout<<"WAITFORNEWCHRONO\n";
// std::cout<<"WAITFORNEWCHRONO\n";
_chronogramme << "'/>";
_svg_file.write(_chronogramme.str().c_str(), _chronogramme.str().size());
_chronogramme.str("");
......@@ -201,7 +201,7 @@ std::cout<<"s.draw_counter("<<xprime<<","<<yprime<<");\n";
{
if (xprime==switchvalue)
{
std::cout<<"WAITFORPOINT\n";
// std::cout<<"WAITFORPOINT\n";
_chronogramme << "\n<path d='M"<< xprime << " " << yprime;
_chronogramme_state=WAIT_FOR_POINT;
}
......@@ -290,7 +290,7 @@ inline void Svg::draw_container(const Element_pos x, const Element_pos y, const
yprime = LEVEL*y;
xprime = LEVEL*x;
std::cout<<"s.draw_container("<<x<<","<<y<<","<<w<<","<< h<<");\n";
// std::cout<<"s.draw_container("<<x<<","<<y<<","<<w<<","<< h<<");\n";
Svg::rectangle("container",wprime, hprime, xprime, yprime, 0xff, 0x44, 0xcc);
......
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