Commit c9f913bd authored by Olivier Lagrasse's avatar Olivier Lagrasse

Fix render bug (mixing QPainter and OpenGL) + change ruler design (not yet completed)

parent 57279798
......@@ -45,6 +45,8 @@
*\brief This is the console interface C source code.
*/
//#define WITH_OTF
#include <queue>
#include <string>
......@@ -63,6 +65,8 @@
#include "common/Tools.hpp"
/* -- */
#include "render/Render_opengl.hpp"
//#include "render/render.hpp"
#include "render/Render_svg.hpp"
......@@ -724,6 +728,7 @@ void Core::launch_action(int state, void* arg) {
case _STATE_RENDER_AREA_REPLACE_SCALE:
_render_opengl->replace_scale( *((Element_pos*)arg) );
_render_opengl->replace_scale_y( *((Element_pos*)arg) );
break;
case _STATE_RENDER_AREA_REPLACE_TRANSLATE:
......
......@@ -79,7 +79,7 @@ Geometry::Geometry(){
_x_scale_container_state = 0.2;/* 20% of screen is used for containers then the other part for states */
_ruler_height = 4.0; /* height of the ruler */
_ruler_height = 8.5; /* height of the ruler */
_ruler_y = 0.0; /* highness of the ruler */
_default_entity_x_translate = 20;/* Info::Render::width * _x_scale_container_state */
......@@ -107,11 +107,11 @@ Geometry::Geometry(){
/* Camera is placed on (0,0,0) and looks to (0,0,-1) */
_z_ruler_over = -0.5;
_z_ruler_over = -0.4;
_z_container = -1.0;
_z_container_under = -1.2;
_z_ruler = -1.5;
_z_ruler_under = -1.6;
_z_ruler = -0.5;
_z_ruler_under = -0.6;
_z_arrow = -2.0;/* closer to camera than containers or states (MUST be negative)*/
_z_event = -3.0;/* closer to camera than containers or states (MUST be negative)*/
_z_counter = -4.0;
......
......@@ -65,7 +65,9 @@ const int Hook_event::_ctrl_zoom_factor = 3;
void Hook_event::updateRender(){
// _render_instance->updateOverlayGL();
_render_instance->updateGL();
//_render_instance->paintEvent(NULL);
}
......@@ -80,16 +82,20 @@ void Hook_event::updateRender(){
**********************************/
Hook_event::Hook_event(Render_opengl* render_instance, Core* core, QWidget *parent)
: QGLWidget(parent){
: QGLWidget(/*QGLFormat(QGL::HasOverlay),*/ parent){
// GLenum glew_code;
if (!QGLFormat::hasOpenGL()){
if (!QGLFormat::hasOpenGL ()){
QMessageBox::information(0, tr("ViTE: Fatal OpenGL error"), tr("This system does not support OpenGL."));
}
/* if (!QGLFormat::hasOpenGLOverlays () ) {
message << tr("Render OpenGL: overlay is not supported!").toStdString() << Message::endw;
}*/
// makeCurrent();/* need to "enable" glew */
// glew_code = glewInit();/* use for VBO and shaders */
......@@ -357,6 +363,7 @@ 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)));
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)));
......
......@@ -94,7 +94,9 @@ const int Render_opengl::DRAWING_TIMER_DEFAULT = 10;
Render_opengl::Render_opengl(Core* core, QWidget *parent)
: Hook_event(this, core, parent){
_arrows.clear();
_circles.clear();
_texts.clear();
......@@ -168,6 +170,10 @@ void Render_opengl::resizeGL(int width, int height) {
glMatrixMode(GL_MODELVIEW);
}
/*void Render_opengl::paintEvent(QPaintEvent *event)
{
makeCurrent();*/
void Render_opengl::paintGL(){
// paintEvent(NULL);
// cout << __FILE__ << " " << __LINE__ << endl;
......@@ -231,6 +237,8 @@ void Render_opengl::paintGL(){
*Message::get_instance() << tr("ERROR LIST not exist for containers.").toStdString() << Message::ende;
else
glCallList(_list_containers);
}
glPopMatrix();
......@@ -340,17 +348,33 @@ void Render_opengl::paintGL(){
message << tr("Render area : the following OpengGL error occured: ").toStdString() << (char *)gluErrorString(glerror) << Message::endw;
/*
}
void Render_opengl::initializeOverlayGL(){
cerr << __FILE__ << " " << __LINE__ << " init overlay" << endl;
}
void Render_opengl::resizeOverlayGL(int width, int height){
cerr << __FILE__ << " " << __LINE__ << " resize overlay" << endl;
}
void Render_opengl::paintOverlayGL (){
*/
// cerr << __FILE__ << " " << __LINE__ << " PLOP" << endl;
QPainter painter(this);
//painter.setPen(Qt::NoPen);
//painter.setBrush(QColor(125, 125, 150));
//painter.drawRect(Info::Screen::width-210, Info::Screen::height-40, 200, 30);
painter.setRenderHint(QPainter::Antialiasing);
painter.setPen(Qt::white);
painter.setFont(QFont("Arial", 10));
/* Draw container text */
for (unsigned int i=0 ; i<_texts.size() ; i++){
painter.drawText( render_to_screen_x( _texts[i].x * _x_scale_container_state/0.20 ),
painter.drawText( render_to_screen_x(_texts[i].x * _x_scale_container_state/0.20),
render_to_screen_y( trace_to_render_y(_texts[i].y) + 0.5),/* '+ 0.5' is used to center text vertically. */
_texts[i].value.c_str());/* prvent this, need to construct Qstring every frames for every texts! */
}
......@@ -361,13 +385,45 @@ void Render_opengl::paintGL(){
Element_pos coeff_prefix;
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);
for (Element_pos i = Info::Render::_x_min_visible ; i < Info::Render::_x_max_visible ; i+=graduation_diff){
painter.setFont(QFont("Arial", 14));
buf_txt.str("");/* flush the buffer */
buf_txt << "min: " << (double)Info::Render::_x_min_visible;
painter.drawText(render_to_screen_x(trace_to_render_x(Info::Render::_x_min_visible)),
render_to_screen_y(3),
buf_txt.str().c_str());
buf_txt.str("");/* flush the buffer */
buf_txt << "max: " << (double)Info::Render::_x_max_visible;
painter.drawText(render_to_screen_x(trace_to_render_x(Info::Render::_x_max_visible))-130,
render_to_screen_y(3),
buf_txt.str().c_str());
buf_txt.str("");
buf_txt << (double)Ruler::get_common_part(Info::Render::_x_min_visible, coeff_prefix) << "--";
painter.drawText( render_to_screen_x(
trace_to_render_x(
(Info::Render::_x_min_visible +
Info::Render::_x_max_visible) / 2)),
render_to_screen_y(3),
buf_txt.str().c_str());
painter.setFont(QFont("Arial", 10));
for (Element_pos i = Info::Render::_x_min_visible ;
i < Info::Render::_x_max_visible ;
i+=graduation_diff){
buf_txt.str("");/* flush the buffer */
buf_txt << Ruler::get_variable_part(i, coeff_prefix, 2);
painter.drawText(render_to_screen_x(trace_to_render_x(i)+1),
render_to_screen_y(4),
render_to_screen_y(8),
buf_txt.str().c_str());
}
......@@ -414,6 +470,13 @@ bool Render_opengl::build(){
_y_state_translate = 0;/* for states translation */
_x_scroll_pos = 0;/* horizontal bar placed on 0 */
_y_scroll_pos = 0;/* vertical bar placed on 0 */
/* if (_wait_timer != NULL){
_wait_timer->stop();
delete(_wait_timer);
_wait_timer = NULL;
}*/
if (NULL == _render_instance)
return true;
......@@ -491,6 +554,16 @@ bool Render_opengl::unbuild(){
if (NULL == _render_instance)
return true;
/* Now, timer is set */
if (_wait_timer == NULL){
_wait_angle = 0.0f;
/* _wait_timer = new QTimer(this);
connect(_wait_timer, SIGNAL(timeout()), _render_instance, SLOT(updateGL()));
_wait_timer->start(_wait_spf);*/
}
return true;//_render_instance->display_unbuild();
}
......@@ -559,10 +632,10 @@ GLuint Render_opengl::draw_wait() {
/* Now, timer is set */
if (_wait_timer == NULL){
_wait_angle = 0.0f;
// _wait_timer = new QTimer(this);
//connect(_wait_timer, SIGNAL(timeout()), _render_instance, SLOT(updateGL()));
//_wait_timer->start(_wait_spf);
/*
_wait_timer = new QTimer(this);
connect(_wait_timer, SIGNAL(timeout()), _render_instance, SLOT(updateGL()));
_wait_timer->start(_wait_spf);*/
}
return object;
......@@ -573,29 +646,34 @@ GLuint Render_opengl::draw_wait() {
void Render_opengl::call_ruler(){
// return;
//return;
/* Now, draw ruler */
float common_part;
float variable_part;
Element_pos graduation_diff;
Element_pos coeff_prefix;
std::ostringstream buf_txt;
// std::ostringstream buf_txt;
const Element_pos offset_x = _default_entity_x_translate;
const Element_pos offset_y = _ruler_y + _ruler_height;
QLabel* ui;
const Element_pos offset_y = _ruler_y + _ruler_height+3.5;
// QLabel* ui;
int count;
/*
QPainter painter(this);
/* Update Info::Render::_x_min_visible and Info::Render::_x_max_visible values */
painter.setPen(Qt::white);
painter.setFont(QFont("Arial", 10));
*/
// 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);
/*
for (count = 0,
ui = Info::Render::_ui_render_min_value,
buf_txt.str(""),/* flush the buffer */
buf_txt.str(""),// flush the buffer
common_part = Ruler::get_common_part(Info::Render::_x_min_visible, coeff_prefix),
variable_part = Ruler::get_variable_part(Info::Render::_x_min_visible, coeff_prefix, 2)
;
......@@ -603,7 +681,7 @@ void Render_opengl::call_ruler(){
;
count++,
ui = Info::Render::_ui_render_max_value,
buf_txt.str(""),/* flush the buffer */
buf_txt.str(""),// flush the buffer
common_part = Ruler::get_common_part(Info::Render::_x_max_visible, coeff_prefix),
variable_part = Ruler::get_variable_part(Info::Render::_x_max_visible, coeff_prefix, 2)
){
......@@ -628,9 +706,11 @@ void Render_opengl::call_ruler(){
buf_txt << variable_part;
}
// painter.drawText(10,10, buf_txt.str().c_str());
ui->setText(buf_txt.str().c_str());
}
painter.end(); */
// if (Info::Render::_ui_render_min_value != NULL){
......@@ -675,7 +755,7 @@ void Render_opengl::call_ruler(){
trace_to_render_x(j) + offset_x, 2+offset_y, _z_ruler);
}
// glColor3d(1, 1, 0);
draw_line( trace_to_render_x(i) + offset_x, offset_y ,
draw_line( trace_to_render_x(i) + offset_x, offset_y-1 ,
trace_to_render_x(i) + offset_x, 4+offset_y, _z_ruler);
// buf_txt.str("");/* flush the buffer */
......@@ -708,14 +788,23 @@ void Render_opengl::call_ruler(){
glBegin(GL_QUADS);
{
glColor4d(0, 0, 1, 1);
glVertex3d(trace_to_render_x(Info::Render::_x_min_visible) , 0, -2 );
glVertex3d(trace_to_render_x(Info::Render::_x_min_visible) , 5, -2 );
glVertex3d(trace_to_render_x(Info::Render::_x_max_visible) , 5, -2 );
glVertex3d(trace_to_render_x(Info::Render::_x_max_visible) , 0, -2 );
glColor4d(0.0, 0.0, 1.0, 0.8);
glVertex3d(trace_to_render_x(Info::Render::_x_min_visible) , 0, _z_ruler_under );
glVertex3d(trace_to_render_x(Info::Render::_x_min_visible) , 8, _z_ruler_under );
glVertex3d(trace_to_render_x(Info::Render::_x_max_visible) , 8, _z_ruler_under );
glVertex3d(trace_to_render_x(Info::Render::_x_max_visible) , 0, _z_ruler_under );
}
glEnd();
glBegin(GL_QUADS);
{
glColor4d(0.0, 0.0, 0.0, 1.0);
glVertex3d(trace_to_render_x(Info::Render::_x_min_visible) , 0, _z_ruler_over );
glVertex3d(trace_to_render_x(Info::Render::_x_min_visible) , 3, _z_ruler_over );
glVertex3d(trace_to_render_x(Info::Render::_x_max_visible) , 3, _z_ruler_over );
glVertex3d(trace_to_render_x(Info::Render::_x_max_visible) , 0, _z_ruler_over );
}
glEnd();
//painter.setPen(Qt::NoPen);
//painter.setBrush(QColor(125, 125, 150));
......
......@@ -218,8 +218,14 @@ public:
/*!
* \brief Call by the system each time the render area need to be updated.
*/
void paintGL();
void paintGL();
//void paintEvent(QPaintEvent *event);
/* void initializeOverlayGL();
void resizeOverlayGL(int width, int height);
void paintOverlayGL();*/
/***********************************
*
......
......@@ -119,15 +119,15 @@ 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 , 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);
// 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;
// if ((x+w) < x_min)
// return;
// if (x > x_max)
// return;
// std::cout << __FILE__ << " " << __LINE__ << " - " << x << " " << << std::endl;
......@@ -254,90 +254,95 @@ void Render_svg::end_draw(){
int max_visible_size;
int*j;
Element_pos k;
if (Info::Render::_x_min_visible != Info::Render::_x_max_visible){
for (j = &min_visible_size,
k = Info::Render::_x_min_visible
;
k <= Info::Render::_x_max_visible
;
j = &max_visible_size,
k += Info::Render::_x_max_visible - Info::Render::_x_min_visible){
if (k==0.0){
*j = 1;
continue;
}
*j = 0;
intpart = 0;
fractpart = k - floor(k);//modf(k, &intpart);
intpart = floor(k);
// cout << __FILE__ << " " << __LINE__ << " >> " << intpart << " " << fractpart << endl;
while(floor(fractpart) != fractpart){
// cout << __FILE__ << " " << __LINE__ << " >> " << floor(fractpart) << " " << fractpart << endl;
fractpart*=10;
(*j)++;
for (j = &min_visible_size,
k = Info::Render::_x_min_visible
;
k <= Info::Render::_x_max_visible
;
j = &max_visible_size,
k += Info::Render::_x_max_visible - Info::Render::_x_min_visible){
if (k==0.0){
*j = 1;
continue;
}
*j = 0;
intpart = 0;
fractpart = k - floor(k);//modf(k, &intpart);
intpart = floor(k);
// cout << __FILE__ << " " << __LINE__ << " >> " << intpart << " " << fractpart << endl;
while(floor(fractpart) != fractpart){
// cout << __FILE__ << " " << __LINE__ << " >> " << floor(fractpart) << " " << fractpart << endl;
fractpart*=10;
(*j)++;
}
(*j) += number_size(intpart);// + number_size(fractpart);
}
(*j) += number_size(intpart);// + number_size(fractpart);
}
// cout << __FILE__ << " " << __LINE__ << " >> " << Info::Render::_x_min_visible << " " << Info::Render::_x_max_visible << endl;
//cout << __FILE__ << " " << __LINE__ << " >> " << min_visible_size << " " << max_visible_size << endl;
/* Draw the main ruler */
const int LETTER_WIDTH = 10;
const int LETTER_HEIGHT = 14;
const int MINVISIBLE_WIDTH = min_visible_size*LETTER_WIDTH;
const int MINVISIBLE_HEIGHT = - LETTER_HEIGHT;;
const int MINVISIBLE_X = 8;
const int MINVISIBLE_Y = - MINVISIBLE_HEIGHT;
const int MAXVISIBLE_WIDTH = max_visible_size*LETTER_WIDTH;
const int MAXVISIBLE_HEIGHT = - LETTER_HEIGHT;;
const int MAXVISIBLE_X = Info::Screen::width - MAXVISIBLE_WIDTH;
const int MAXVISIBLE_Y = - MAXVISIBLE_HEIGHT;
_buffer.str("");
_buffer << "<polygon points=\""
<< MINVISIBLE_X << "," << MINVISIBLE_Y << ","
<< MINVISIBLE_X+MINVISIBLE_WIDTH << "," << MINVISIBLE_Y << ","
<< MINVISIBLE_X+MINVISIBLE_WIDTH << "," << MINVISIBLE_Y+MINVISIBLE_HEIGHT << ","
<< MINVISIBLE_X << "," << MINVISIBLE_Y+MINVISIBLE_HEIGHT << "\""
<< " style=\"fill:black\""
<< "/>\n";
_buffer << "<text x=\"" << MINVISIBLE_X <<"\""
<< " y=\"" << MINVISIBLE_Y << "\""
<< " font-size=\"" << LETTER_HEIGHT << "\""
<< " fill=\"white\">"
<< Info::Render::_x_min_visible
<< "</text>\n";
_buffer << "<polygon points=\""
<< MAXVISIBLE_X << "," << MAXVISIBLE_Y << ","
<< MAXVISIBLE_X+MAXVISIBLE_WIDTH << "," << MAXVISIBLE_Y << ","
<< MAXVISIBLE_X+MAXVISIBLE_WIDTH << "," << MAXVISIBLE_Y+MAXVISIBLE_HEIGHT << ","
<< MAXVISIBLE_X << "," << MAXVISIBLE_Y+MAXVISIBLE_HEIGHT << "\""
<< " style=\"fill:black\""
<< "/>\n";
_buffer << "<text x=\"" << MAXVISIBLE_X <<"\""
<< " y=\"" << MAXVISIBLE_Y << "\""
<< " font-size=\"" << LETTER_HEIGHT << "\""
<< " fill=\"white\">"
<< Info::Render::_x_max_visible
<< "</text>\n";
// cout << __FILE__ << " " << __LINE__ << " >> " << Info::Render::_x_min_visible << " " << Info::Render::_x_max_visible << endl;
//cout << __FILE__ << " " << __LINE__ << " >> " << min_visible_size << " " << max_visible_size << endl;
/* Draw the main ruler */
const int LETTER_WIDTH = 10;
const int LETTER_HEIGHT = 14;
const int MINVISIBLE_WIDTH = min_visible_size*LETTER_WIDTH;
const int MINVISIBLE_HEIGHT = - LETTER_HEIGHT;;
const int MINVISIBLE_X = 8;
const int MINVISIBLE_Y = - MINVISIBLE_HEIGHT;
const int MAXVISIBLE_WIDTH = max_visible_size*LETTER_WIDTH;
const int MAXVISIBLE_HEIGHT = - LETTER_HEIGHT;;
const int MAXVISIBLE_X = Info::Screen::width - MAXVISIBLE_WIDTH;
const int MAXVISIBLE_Y = - MAXVISIBLE_HEIGHT;
Element_pos coeff_prefix;
coeff_prefix = Ruler::get_coeff_for_common_prefix(Info::Render::_x_min_visible, Info::Render::_x_max_visible);
_buffer.str("");
_buffer << "<polygon points=\""
<< MINVISIBLE_X << "," << MINVISIBLE_Y << ","
<< MINVISIBLE_X+MINVISIBLE_WIDTH << "," << MINVISIBLE_Y << ","
<< MINVISIBLE_X+MINVISIBLE_WIDTH << "," << MINVISIBLE_Y+MINVISIBLE_HEIGHT << ","
<< MINVISIBLE_X << "," << MINVISIBLE_Y+MINVISIBLE_HEIGHT << "\""
<< " style=\"fill:black\""
<< "/>\n";
_buffer << "<text x=\"" << MINVISIBLE_X <<"\""
<< " y=\"" << MINVISIBLE_Y << "\""
<< " font-size=\"" << LETTER_HEIGHT << "\""
<< " fill=\"white\">"
//<< Ruler::get_common_part_string(Info::Render::_x_min_visible, coeff_prefix)
<< Info::Render::_x_min_visible
<< "</text>\n";
_buffer << "<polygon points=\""
<< MAXVISIBLE_X << "," << MAXVISIBLE_Y << ","
<< MAXVISIBLE_X+MAXVISIBLE_WIDTH << "," << MAXVISIBLE_Y << ","
<< MAXVISIBLE_X+MAXVISIBLE_WIDTH << "," << MAXVISIBLE_Y+MAXVISIBLE_HEIGHT << ","
<< MAXVISIBLE_X << "," << MAXVISIBLE_Y+MAXVISIBLE_HEIGHT << "\""
<< " style=\"fill:black\""
<< "/>\n";
_buffer << "<text x=\"" << MAXVISIBLE_X <<"\""
<< " y=\"" << MAXVISIBLE_Y << "\""
<< " font-size=\"" << LETTER_HEIGHT << "\""
<< " fill=\"white\">"
// << Ruler::get_common_part_string(Info::Render::_x_max_visible, coeff_prefix)
<< Info::Render::_x_max_visible
<< "</text>\n";
}/* end if (Info::Render::_x_min_visible != Info::Render::_x_max_visible) */
/* Close the svg file */
_buffer << "</svg>";
_output_file.write(_buffer.str().c_str(), _buffer.str().size());
}
......
......@@ -198,3 +198,69 @@ float Ruler::get_variable_part(const Element_pos n, const Element_pos coeff_for_
else
return (float)common_part;
}
string Ruler::get_common_part_string(const Element_pos n, const Element_pos coeff_for_common_prefix){
ostringstream buf_txt;
float n_with_coeff;
n_with_coeff = n/coeff_for_common_prefix;
buf_txt.str("");
if (coeff_for_common_prefix > 1){/* point is in variable part */
float coeff;
coeff = coeff_for_common_prefix;
/**
* For example 102.34 with common 1**.**
*/
buf_txt << floor(n_with_coeff);
/**
* buf_txt = "1"
*/
for (;
coeff > 1;
coeff /= 10){
/**
* First loop: buf_txt = "1-"
* Second loop: buf_txt = "1--"
*/
buf_txt << "-";
}
buf_txt << ".-";
/**
* buf_txt = "1--.-"
*/
}else if (coeff_for_common_prefix < 1){/* point is in common part */
/**
* For example 10.234 with common 10.2**
*/
buf_txt << floor(n) << ".";
/**
* buf = "10"+"."
*/
buf_txt << floor(n)*coeff_for_common_prefix - n_with_coeff;
/**
* buf = "10."+10*10-102 = "10."+"2" = "10.2"
*/
buf_txt << "--";
/**
* buf = "10.2--"
*/
}else{/* point is between common and variable part */
/**
* For example 102.34 with common 102.**
*/
buf_txt << floor(n) << ".--";
/**
* buf_txt = "102.--"
*/
}
return buf_txt.str();
}
......@@ -47,6 +47,7 @@
#ifndef RULER_HPP
#define RULER_HPP
#include <string>
/*!
* \brief
......@@ -81,7 +82,7 @@ public:
/*!
* \brief Work out the coefficient (or the comma shift) to separate the common part
* (at the left of the comma) from the variable part. (at the rigt of the comma)
* (at the left of the comma) from the variable part. (at the right of the comma)
* \arg min The minimum time visible. (In trace coordinate.)
* \arg max The maximum time visible. (In trace coordinate.)
* \return The coefficient used to separate the common and the variable part of graduation numbers.
......@@ -98,6 +99,15 @@ public:
*/
static float get_common_part(const Element_pos n, const Element_pos coeff_for_common_pre