From 09d04ce963c037e5eb50faf598779738b1789e59 Mon Sep 17 00:00:00 2001
From: Oliver Bock <oliver.bock@aei.mpg.de>
Date: Thu, 19 Aug 2010 14:49:10 +0200
Subject: [PATCH] Improved text rendering

* Slightly increased font size
* Added a legend when displaying the axes
* Fixed typo
---
 src/pulsaranimationwidget.cpp | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/pulsaranimationwidget.cpp b/src/pulsaranimationwidget.cpp
index db6e1b1..8ba28a4 100644
--- a/src/pulsaranimationwidget.cpp
+++ b/src/pulsaranimationwidget.cpp
@@ -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);
-- 
GitLab