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
f2b82484
Commit
f2b82484
authored
May 16, 2009
by
Mathieu Faverge
Browse files
Correct text position and negative height
parent
d1eaf35a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/render/render_stats_svg.cpp
View file @
f2b82484
...
...
@@ -55,9 +55,9 @@ void Render_stats_svg::fill_file(){
Element_pos
b
=
*
it_rect
;
_svg_file
<<
"<rect width=
\"
"
<<
w
<<
"
\"
height=
\"
"
<<
-
h
<<
"
\"
height=
\"
"
<<
h
<<
"
\"
x=
\"
"
<<
x
<<
"
\"
y=
\"
"
<<
height
-
(
y
-
_y_min
)
<<
"
\"
y=
\"
"
<<
height
-
(
y
-
_y_min
)
-
h
<<
"
\"
fill=
\"
rgb("
<<
(
int
)(
r
*
255
)
<<
","
<<
(
int
)(
g
*
255
)
<<
","
<<
(
int
)(
b
*
255
)
<<
")
\"
/>
\n
"
;
...
...
@@ -88,7 +88,7 @@ void Render_stats_svg::fill_file(){
buf_txt
=
*
it_txt
;
_svg_file
<<
"<text x=
\"
"
<<
buf_x
<<
"
\"
y=
\"
"
<<
height
-
(
buf_y
+
10
-
_y_min
)
<<
"
\"
y=
\"
"
<<
height
-
(
buf_y
-
_y_min
)
<<
"
\"
>"
<<
buf_txt
<<
"</text>
\n
"
;
}
/* end for(...) */
...
...
src/render/render_stats_svg.hpp
View file @
f2b82484
...
...
@@ -149,8 +149,8 @@ inline void Render_stats_svg::start_draw(){
}
inline
void
Render_stats_svg
::
draw_text
(
const
Element_pos
x
,
const
Element_pos
y
,
const
std
::
string
value
)
{
_y_min
=
fmin
(
y
,
_y_min
);
_y_max
=
fmax
(
y
+
10
,
_y_max
);
_y_min
=
fmin
(
y
-
5
,
_y_min
);
_y_max
=
fmax
(
y
+
5
,
_y_max
);
_text_pos
.
push_back
(
x
);
_text_pos
.
push_back
(
y
);
...
...
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