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
f854b712
Commit
f854b712
authored
Sep 09, 2011
by
Oliver Bock
Browse files
Render copyright information
parent
ca49b148
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pulsaranimationwidget.cpp
View file @
f854b712
...
...
@@ -339,7 +339,7 @@ void PulsarAnimationWidget::paintGL()
}
glPopMatrix
();
// save current state
// save current state
(the following is using parallel projection)
glMatrixMode
(
GL_PROJECTION
);
glPushMatrix
();
{
...
...
@@ -401,6 +401,35 @@ void PulsarAnimationWidget::paintGL()
}
glPopMatrix
();
}
// save current state (the following is using parallel projection)
glMatrixMode
(
GL_PROJECTION
);
glPushMatrix
();
{
glLoadIdentity
();
glOrtho
(
0
,
width
(),
0
,
height
(),
0.1
,
501.0
);
glMatrixMode
(
GL_MODELVIEW
);
glPushMatrix
();
{
glLoadIdentity
();
// 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
(
11
);
font
.
setBold
(
true
);
font
.
setFamily
(
"Arial"
);
font
.
setStyleStrategy
((
QFont
::
StyleStrategy
)
(
QFont
::
OpenGLCompatible
|
QFont
::
PreferQuality
));
renderText
(
10
,
25
,
-
100
,
QString
::
fromLocal8Bit
(
"Copyright © 2009-2011"
),
font
);
renderText
(
10
,
10
,
-
100
,
QString
::
fromLocal8Bit
(
"Max-Planck-Insitut für Gravitationsphysik"
),
font
);
// restore original state
glMatrixMode
(
GL_PROJECTION
);
}
glPopMatrix
();
glMatrixMode
(
GL_MODELVIEW
);
}
glPopMatrix
();
}
void
PulsarAnimationWidget
::
runAnimation
()
...
...
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