Attention une mise à jour du serveur va être effectuée le vendredi 16 avril entre 12h et 12h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit d70f2b0c authored by Thibault Soucarre's avatar Thibault Soucarre

add variable texts

parent e7434a41
......@@ -294,6 +294,17 @@ void Render_alternate::paintGL(){
//draw texts for variables
std::map<long int, Variable_text_>::const_iterator it=_variable_texts.begin();
const std::map<long int, Variable_text_>::const_iterator it_end=_variable_texts.end();
renderText ( render_to_screen_x(trace_to_render_x(vertical_line))+3,
render_to_screen_y( trace_to_render_y((*it).second.y) + 0.5),
//we calculate the height of the interline we want : max height of the font + 1 pixel to avoid overlapping (metric.height() returns a bigger value, a bit too much)
......@@ -327,7 +338,7 @@ void Render_alternate::paintGL(){
/*Draw ruler text*/
std::ostringstream buf_txt;
Element_pos graduation_diff;
Element_pos coeff_prefix;
......@@ -832,8 +843,22 @@ void Render_alternate::release(){
void Render_alternate::draw_text_value(long int id,double text, double y){
Variable_text_ buf;
// printf("adding %f at %f for %p\n", text, y, (void*)id);
//it's an update
Variable_text_ buf=_variable_texts[id];
//printf("updating %f at %f for %p\n", text, y, (void*)id);
void Render_alternate::show_minimap(){
......@@ -75,7 +75,13 @@
class Render_alternate;
class Interface_console;
struct Container_text_;
* \brief Structure used to store text for variables.
struct Variable_text_{
Element_pos y;
Element_pos value;
* \brief This class redefined the OpenGL widget - QGLWidget - to display the trace.
......@@ -91,6 +97,7 @@ private:
std::vector<Element_pos> _links;
std::vector<Element_pos> _events;
std::vector<Container_text_> _texts;
std::map<long int, Variable_text_> _variable_texts;
glm::mat4 _modelview;
glm::mat4 _projection;
Vbo _containers;
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