| VRS - The Virtual Rendering System |
| version 3.3 |
00001 /********************************************************************** 00002 VRS - The Virtual Rendering System 00003 Copyright (C) 2001 Computer Graphics Systems Group at the 00004 Hasso-Plattner-Institute, Potsdam, Germany. 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 This library is distributed in the hope that it will be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 See the GNU Lesser General Public License for more details. 00013 You should have received a copy of the GNU Lesser+ General Public 00014 License along with this library; if not, write to the FreeSoftware 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA, 02111-1307, USA. 00016 **********************************************************************/ 00017 00018 00019 #ifndef __GLYPHTYPES_H__ 00020 #define __GLYPHTYPES_H__ 00021 00022 #include <vrs/sharedobj.h> 00023 #include <vrs/text/vrs_textprerequisites.h> 00024 00026 namespace VRS 00027 { 00028 namespace TEXT 00029 { 00031 enum GlyphTypeID { 00033 GTI_NONE = 0, 00035 GTI_IMAGE = 1, 00037 GTI_VECTOR = 2, 00039 GTI_ALL = 0xFFFFFFFF }; 00040 00045 class VRS_CORE_API AbstractGlyph : public SharedObj 00046 { 00047 public: 00048 virtual ~AbstractGlyph() {}; 00049 00051 virtual GlyphTypeID getGlyphTypeID() const = 0; 00052 00053 VRS_TYPEINFO(AbstractGlyph, SharedObj); 00054 }; 00055 00056 class FontTexture; 00057 00060 class VRS_CORE_API ImageGlyph : public AbstractGlyph 00061 { 00062 public: 00063 ImageGlyph( float u, float v, float uvwidth, float uvheight, SO<FontTexture> ft ); 00064 virtual ~ImageGlyph() {}; 00065 00067 inline float getU() const 00068 { return m_U; }; 00070 inline float getV() const 00071 { return m_V; }; 00073 inline float getUvWidth() const 00074 { return m_UvWidth; }; 00076 inline float getUvHeight() const 00077 { return m_UvHeight; }; 00078 00080 inline SO<FontTexture> getFontTexture() const 00081 { return m_FontTexture; }; 00082 00084 virtual GlyphTypeID getGlyphTypeID() const; 00085 00086 VRS_TYPEINFO(ImageGlyph, AbstractGlyph); 00087 private: 00089 float m_U; 00091 float m_V; 00093 float m_UvWidth; 00095 float m_UvHeight; 00097 SO<FontTexture> m_FontTexture; 00098 }; 00099 } 00100 } 00101 00102 #endif