00001 /* +---------------------------------------------------------------------------+ 00002 | The Mobile Robot Programming Toolkit (MRPT) C++ library | 00003 | | 00004 | http://www.mrpt.org/ | 00005 | | 00006 | Copyright (C) 2005-2011 University of Malaga | 00007 | | 00008 | This software was written by the Machine Perception and Intelligent | 00009 | Robotics Lab, University of Malaga (Spain). | 00010 | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> | 00011 | | 00012 | This file is part of the MRPT project. | 00013 | | 00014 | MRPT is free software: you can redistribute it and/or modify | 00015 | it under the terms of the GNU General Public License as published by | 00016 | the Free Software Foundation, either version 3 of the License, or | 00017 | (at your option) any later version. | 00018 | | 00019 | MRPT is distributed in the hope that it will be useful, | 00020 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 00021 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 00022 | GNU General Public License for more details. | 00023 | | 00024 | You should have received a copy of the GNU General Public License | 00025 | along with MRPT. If not, see <http://www.gnu.org/licenses/>. | 00026 | | 00027 +---------------------------------------------------------------------------+ */ 00028 00029 #ifndef mrpt_opengl_fonts_H 00030 #define mrpt_opengl_fonts_H 00031 00032 #include <mrpt/utils/TColor.h> 00033 #include <mrpt/utils/types.h> 00034 #include <mrpt/opengl/link_pragmas.h> 00035 00036 namespace mrpt 00037 { 00038 namespace opengl 00039 { 00040 /** Existing fonts for 2D texts in mrpt::opengl methods. 00041 * \sa mrpt::opengl::CMyGLCanvasBase::renderTextBitmap 00042 * \ingroup mrpt_opengl_grp 00043 */ 00044 enum TOpenGLFont 00045 { 00046 MRPT_GLUT_BITMAP_NONE = -1, 00047 MRPT_GLUT_BITMAP_TIMES_ROMAN_10 = 0, 00048 MRPT_GLUT_BITMAP_TIMES_ROMAN_24 = 1, 00049 MRPT_GLUT_BITMAP_HELVETICA_10 = 2, 00050 MRPT_GLUT_BITMAP_HELVETICA_12 = 3, 00051 MRPT_GLUT_BITMAP_HELVETICA_18 = 4 00052 }; 00053 00054 /** Different style for vectorized font rendering \sa T2DTextData */ 00055 enum TOpenGLFontStyle { 00056 FILL = 0, ///< renders glyphs as filled polygons 00057 OUTLINE = 1, ///< renders glyphs as outlines with GL_LINES 00058 NICE = 2 ///< renders glyphs filled with antialiased outlines 00059 }; 00060 00061 /** An auxiliary struct for holding a list of text messages in some mrpt::opengl & mrpt::gui classes 00062 * The font can be either a bitmapped or a vectorized font. 00063 * \sa mrpt::opengl::CTextMessageCapable 00064 * \ingroup mrpt_opengl_grp 00065 */ 00066 struct OPENGL_IMPEXP T2DTextData 00067 { 00068 T2DTextData() : 00069 font(MRPT_GLUT_BITMAP_NONE), 00070 vfont_name(), 00071 vfont_spacing(1.5), 00072 vfont_kerning(0.1) 00073 { 00074 } 00075 00076 std::string text; 00077 mrpt::utils::TColorf color; 00078 double x,y; 00079 /** @name Bitmapped font params 00080 @{ */ 00081 mrpt::opengl::TOpenGLFont font; 00082 /** @} */ 00083 00084 /** @name Vectorized font params - Applicable only if font==MRPT_GLUT_BITMAP_NONE 00085 @{ */ 00086 std::string vfont_name; //!< Vectorized font name ("sans","mono","serif") 00087 double vfont_scale; //!< Size of characters 00088 TOpenGLFontStyle vfont_style; 00089 double vfont_spacing; //!< Refer to mrpt::opengl::gl_utils::glDrawText 00090 double vfont_kerning; //!< Refer to mrpt::opengl::gl_utils::glDrawText 00091 /** @} */ 00092 }; 00093 00094 } 00095 } 00096 00097 #endif
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011 |