Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
einsteinathome
pulsatingscience
Commits
09d04ce9
Commit
09d04ce9
authored
Aug 19, 2010
by
Oliver Bock
Browse files
Improved text rendering
* Slightly increased font size * Added a legend when displaying the axes * Fixed typo
parent
c2dad214
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pulsaranimationwidget.cpp
View file @
09d04ce9
...
...
@@ -519,12 +519,22 @@ void PulsarAnimationWidget::paintGL()
// draw copyright info last (appears in front of everything)
glColor4f
(
1.0
f
,
1.0
f
,
1.0
f
,
0.5
f
);
QFont
font
;
font
.
setPointSize
(
1
1
);
font
.
setPointSize
(
1
6
);
font
.
setBold
(
true
);
font
.
setFamily
(
"Arial"
);
font
.
setStyleStrategy
((
QFont
::
StyleStrategy
)
(
QFont
::
OpenGLCompatible
|
QFont
::
PreferQuality
));
renderText
(
10
,
25
,
-
100
,
QString
::
fromLocal8Bit
(
"Copyright © 2009-2010"
),
font
);
renderText
(
10
,
10
,
-
100
,
QString
::
fromLocal8Bit
(
"Max-Planck-Insitut für Gravitationsphysik"
),
font
);
renderText
(
10
,
30
,
-
100
,
QString
::
fromLocal8Bit
(
"Copyright © 2009-2010"
),
font
);
renderText
(
10
,
10
,
-
100
,
QString
::
fromLocal8Bit
(
"Max-Planck-Institut für Gravitationsphysik"
),
font
);
if
(
m_showRotationAxes
)
{
// draw legend
glColor4f
(
1.0
f
,
1.0
f
,
1.0
f
,
1.0
f
);
renderText
(
width
()
-
190
,
height
()
-
25
,
-
100
,
QString
::
fromLocal8Bit
(
"◼ Pulsar Rotation Axis"
),
font
);
glColor4f
(
1.0
f
,
1.0
f
,
0.0
f
,
1.0
f
);
renderText
(
width
()
-
190
,
height
()
-
50
,
-
100
,
QString
::
fromLocal8Bit
(
"◼ Magnetic Field Axis"
),
font
);
glColor4f
(
0.0
f
,
0.0
f
,
1.0
f
,
1.0
f
);
renderText
(
width
()
-
190
,
height
()
-
75
,
-
100
,
QString
::
fromLocal8Bit
(
"◼ Line Of Sight (Earth)"
),
font
);
}
// restore original state
glMatrixMode
(
GL_PROJECTION
);
...
...
Write
Preview
Supports
Markdown
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