• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KGLLib

textrenderer.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2007-2008 Benoit Jacob
00003  * Copyright (C) 2008 Rivo Laks <rivolaks@hot.ee>
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either 
00008  * version 2.1 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public 
00016  * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017  */
00018 
00019 /*
00020  This file has been taken from Avogadro project - http://avogadro.sourceforge.net/
00021  As such, it uses different coding style than the rest of the KGLLib. This is
00022  meant to minimize differences between this version and the one used by
00023  Avogadro, so that bugfixes, etc made to one version could easily be merged
00024  into the other one.
00025  */
00026 
00027 #ifndef KGLLIB_TEXTRENDERER_H
00028 #define KGLLIB_TEXTRENDERER_H
00029 
00030 #include "kgllib.h"
00031 #include <Eigen/Core>
00032 
00033 #include <QtGui/QFont>
00034 
00035 
00036 namespace KGLLib
00037 {
00038 
00039 class GLWidget;
00040 
00096   class KGLLIB_EXPORT TextRenderer
00097   {
00098     public:
00099       TextRenderer();
00100       ~TextRenderer();
00101 
00106       void begin(GLWidget *widget);
00107 
00112       void end();
00113 
00121       int draw( const Eigen::Vector3d & pos, const QString &string, const QFont& font = QFont());
00122 
00132       int draw( int x, int y, const QString &string, const QFont& font = QFont());
00133 
00152       int draw( const QRect& rect, const QString &string, int flags, const QFont& font = QFont());
00153 
00154       bool isActive();
00155 
00156     private:
00157 
00158       class Private;
00159       Private * const d;
00160   };
00161 
00162 } // namespace KGLLib
00163 
00164 #endif // KGLLIB_TEXTRENDERER_H

KGLLib

Skip menu "KGLLib"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KGLLib
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal