Commit 934628cd authored by Thibault Soucarre's avatar Thibault Soucarre

change ruler graduations and container text

parent 48fd4526
......@@ -169,7 +169,7 @@ public:
_containers.push_back(buf);
Container_text_ buft;
buft.x = x;
buft.x = x + w/5;
buft.y = y + h/2;
buft.value = value;
......
......@@ -628,12 +628,12 @@ void Render_alternate::call_ruler(){
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){
draw_line( trace_to_render_x(j) + offset_x, offset_y ,
trace_to_render_x(j) + offset_x, 2+offset_y, _z_ruler);
draw_line( trace_to_render_x(j) + offset_x, 3,
trace_to_render_x(j) + offset_x, 5.5, _z_ruler);
}
draw_line( trace_to_render_x(i) + offset_x, offset_y-1 ,
trace_to_render_x(i) + offset_x, 4+offset_y, _z_ruler);
draw_line( trace_to_render_x(i) + offset_x, 3,
trace_to_render_x(i) + offset_x, 8, _z_ruler);
}
return;
......@@ -705,8 +705,8 @@ void Render_alternate::draw_line(Element_pos x1, Element_pos y1, Element_pos x2,
_counters.add(x2+offset_x,y2+offset_y,_r,_g,_b);
}
else if(_draw_ruler){
_ruler.add(x1+offset_x, y1+offset_y, _r, _g, _b);
_ruler.add(x2+offset_x, y2+offset_y, _r, _g, _b);
_ruler.add(x1+offset_x, y1, _r, _g, _b);
_ruler.add(x2+offset_x, y2, _r, _g, _b);
}
else{
......
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