Skip to content
Snippets Groups Projects
Commit 09d04ce9 authored by Oliver Bock's avatar Oliver Bock
Browse files

Improved text rendering

* Slightly increased font size
* Added a legend when displaying the axes
* Fixed typo
parent c2dad214
Branches
No related tags found
No related merge requests found
......@@ -519,12 +519,22 @@ void PulsarAnimationWidget::paintGL()
// draw copyright info last (appears in front of everything)
glColor4f(1.0f, 1.0f, 1.0f, 0.5f);
QFont font;
font.setPointSize(11);
font.setPointSize(16);
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.0f, 1.0f, 1.0f, 1.0f);
renderText(width() - 190, height() - 25, -100, QString::fromLocal8Bit("◼ Pulsar Rotation Axis"), font);
glColor4f(1.0f, 1.0f, 0.0f, 1.0f);
renderText(width() - 190, height() - 50, -100, QString::fromLocal8Bit("◼ Magnetic Field Axis"), font);
glColor4f(0.0f, 0.0f, 1.0f, 1.0f);
renderText(width() - 190, height() - 75, -100, QString::fromLocal8Bit("◼ Line Of Sight (Earth)"), font);
}
// restore original state
glMatrixMode(GL_PROJECTION);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment