Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
vite
Commits
a50d8c49
Commit
a50d8c49
authored
Nov 02, 2014
by
Mathieu Faverge
Browse files
GanttDiagram only calls draw_arrow
parent
89f5f10d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
src/render/GanttDiagram.hpp
View file @
a50d8c49
...
...
@@ -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.0
f
/
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
);
}
...
...
src/render/Render_svg.cpp
View file @
a50d8c49
...
...
@@ -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.0
f
/
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
(){
...
...
src/trace/DrawTrace.hpp
View file @
a50d8c49
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment