Commit a50d8c49 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

GanttDiagram only calls draw_arrow

parent 89f5f10d
......@@ -316,11 +316,6 @@ public:
const Element_col b,
EntityValue* value)
{
/* For SVG */
const Element_pos triangle_size = 2.0;
const Element_pos coeff = 180.0f/M_PI;
Element_pos angle;
_render->set_color(r, g, b);
start_time = trace_to_render_x(start_time - Info::Render::_x_min_visible);
......@@ -328,14 +323,6 @@ public:
start_height = trace_to_render_y(start_height);
end_height = trace_to_render_y(end_height);
if (start_time != end_time)
angle = atan2((end_height - start_height), (end_time - start_time))*coeff;
else
angle = 90;
_render->draw_triangle(end_time, end_height, triangle_size, angle);
_render->draw_line(start_time, start_height, end_time, end_height, _z_arrow);
/* For OpenGL */
_render->draw_arrow(start_time, end_time, start_height, end_height, r, g, b, value);
}
......
......@@ -99,7 +99,7 @@ Render_svg::~Render_svg(){
void Render_svg::set_color(float r, float g, float b){
_red = r;
_red = r;
_green = g;
_blue = b;
}
......@@ -230,7 +230,27 @@ void Render_svg::end_draw_states(){
void Render_svg::start_draw_arrows(){
}
void Render_svg::draw_arrow(const Element_pos , const Element_pos , const Element_pos , const Element_pos, const Element_col, const Element_col, const Element_col, EntityValue*){
void Render_svg::draw_arrow(const Element_pos start_time,
const Element_pos end_time,
const Element_pos start_height,
const Element_pos end_height,
const Element_col r,
const Element_col g,
const Element_col b,
EntityValue *value)
{
const Element_pos triangle_size = 2.0;
const Element_pos coeff = 180.0f/M_PI;
Element_pos angle;
(void)value;
if (start_time != end_time)
angle = atan2((end_height - start_height), (end_time - start_time))*coeff;
else
angle = 90;
draw_triangle(end_time, end_height, triangle_size, angle);
draw_line(start_time, start_height, end_time, end_height, _z_arrow);
}
void Render_svg::end_draw_arrows(){
......
This diff is collapsed.
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