Commit 1b306f0f authored by Olivier Lagrasse's avatar Olivier Lagrasse

- Mise a jour a chaque dessin de l'intervalle de temps visible de la

trace (pour la fenetre d'exportation).
parent 4e515393
......@@ -6,9 +6,10 @@
#include "render_opengl.hpp"
extern bool Info::Render::_key_alt;
extern bool Info::Render::_key_ctrl;
bool Info::Render::_key_alt;
bool Info::Render::_key_ctrl;
Element_pos Info::Render::_x_min_visible = 0;
Element_pos Info::Render::_x_max_visible = 0;
using namespace std;
......@@ -887,6 +888,8 @@ void Render_opengl::refresh_scroll_bars(bool LENGTH_CHANGED){
_y_scroll_pos = _y_state_translate;
Element_pos buf[2] = {_x_scroll_pos, _y_scroll_pos};
_core->launch_action(Interface_console::_STATE_REFRESH_SCROLL_BARS, buf);
update_visible_interval_value();
}
......@@ -896,6 +899,10 @@ void Render_opengl::change_scale_container_state(int view_size){
updateGL();
}
void Render_opengl::update_visible_interval_value(){
Info::Render::_x_min_visible = max(_state_x_min, (_state_translate - _default_entity_x_translate)/(_state_scale*((_render_width)/(_state_x_max-_state_x_min)) ));
Info::Render::_x_max_visible = min(_state_x_max, (_state_translate - _default_entity_x_translate + _render_width)/(_state_scale*((_render_width)/(_state_x_max-_state_x_min)) ));
}
/***********************************
......@@ -1130,6 +1137,7 @@ void Render_opengl::create_ruler(){
Element_pos coeff;
Element_pos buf_number;
Element_pos graduation_distance_per_5;
Element_pos accuracy;/* n */
double ruler_bg_r, ruler_bg_g, ruler_bg_b;/* the ruler background color (in RGB mode)*/
......@@ -1157,7 +1165,7 @@ void Render_opengl::create_ruler(){
glEnable(GL_ALPHA_TEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
......
......@@ -518,54 +518,6 @@ public:
/***********************************
*
* Pre register translate values.
*
**********************************/
// /*!
// * \brief To show the x beginning of the trace.
// */
// static const int X_TRACE_BEGINNING = 0;
// /*!
// * \brief To show the y beginning of the trace.
// */
// static const int Y_TRACE_BEGINNING = 1;
// /*!
// * \brief To show the x ending of the trace.
// */
// static const int X_TRACE_ENDING = 2;
// /*!
// * \brief To show the y ending of the trace.
// */
// static const int Y_TRACE_ENDING = 3;
// /*!
// * \brief To show the horizontal entire trace.
// */
// static const int X_TRACE_ENTIRE = 4;
// /*!
// * \brief To show the vertical entire trace.
// */
// static const int Y_TRACE_ENTIRE = 5;
// /*!
// * \brief To show the left screen of the current view.
// */
// static const int X_SCREEN_LEFT_MOVE = 6;
// /*!
// * \brief To show the right screen of the current view.
// */
// static const int X_SCREEN_RIGHT_MOVE = 7;
/***********************************
*
* Scaling and scrolling functions.
......@@ -633,7 +585,11 @@ 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();
/***********************************
*
......
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