Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGTextTXFGlyph.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *             Copyright (C) 2000-2002 by the OpenSG Forum                   *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035  *                                                                           *
00036  *                                                                           *
00037 \*---------------------------------------------------------------------------*/
00038 
00039 #ifndef _OSGTEXTTXFGLYPH_H_
00040 #define _OSGTEXTTXFGLYPH_H_
00041 
00042 #ifdef _MSC_VER
00043 # pragma once
00044 #endif
00045 
00046 
00047 #include <OSGConfig.h>
00048 #include <OSGSystemDef.h>
00049 #include <OSGBaseTypes.h>
00050 
00051 #include "OSGTextGlyph.h"
00052 
00053 
00054 OSG_BEGIN_NAMESPACE
00055 
00056 
00061 class OSG_SYSTEMLIB_DLLMAPPING TextTXFGlyph: public TextGlyph
00062 {
00063 
00065   friend class TextTXFFace;
00066 
00067     /*==========================  PUBLIC  =================================*/
00068   public:
00069 
00071     virtual ~TextTXFGlyph();
00072 
00077     virtual Real32 getWidth() const;
00078 
00083     virtual Real32 getHeight() const;
00084 
00091     virtual Real32 getHoriBearingX() const;
00092 
00099     virtual Real32 getHoriBearingY() const;
00100 
00107     virtual Real32 getVertBearingX() const;
00108 
00115     virtual Real32 getVertBearingY() const;
00116 
00121     inline UInt32 getX() const;
00122 
00127     inline UInt32 getY() const;
00128 
00133     inline UInt32 getPixmapWidth() const;
00134 
00139     inline UInt32 getPixmapHeight() const;
00140 
00147     inline Int32 getPixmapHoriBearingX() const;
00148 
00155     inline Int32 getPixmapHoriBearingY() const;
00156 
00163     inline Int32 getPixmapVertBearingX() const;
00164 
00171     inline Int32 getPixmapVertBearingY() const;
00172 
00177     inline Real32 getScale() const;
00178 
00180     enum CoordIndex { COORD_LEFT = 0, COORD_TOP = 1, COORD_RIGHT = 2, COORD_BOTTOM = 3 };
00181 
00188     inline Real32 getTexCoord(UInt32 index) const;
00189 
00196     inline Real32 getCoord(UInt32 index) const;
00197 
00198     /*=========================  PROTECTED  ===============================*/
00199   protected:
00200 
00202     TextTXFGlyph();
00203 
00205     UInt32 _width;
00206 
00208     UInt32 _height;
00209 
00211     Int32 _horiBearingX;
00212 
00214     Int32 _horiBearingY;
00215 
00217     Int32 _vertBearingX;
00218 
00220     Int32 _vertBearingY;
00221 
00223     UInt32 _x;
00224 
00226     UInt32 _y;
00227 
00229     Real32 _scale;
00230 
00232     Real32 _texCoord[4];
00233 
00235     void calculateCoordinates(UInt32 textureWidth, UInt32 textureHeight);
00236 
00237     /*==========================  PRIVATE  ================================*/
00238   private:
00239 
00241     TextTXFGlyph(const TextTXFGlyph &);
00242 
00244     const TextTXFGlyph &operator=(const TextTXFGlyph &);
00245 };
00246 
00247 
00248 OSG_END_NAMESPACE
00249 
00250 
00251 #include <OSGTextTXFGlyph.inl>
00252 
00253 #define OSGTEXTTXFGLYPH_HEADER_CVSID "@(#)$Id: OSGTextTXFGlyph.h,v 1.1 2005/03/03 13:43:07 a-m-z Exp $"
00254 
00255 #endif /* _OSGTEXTTXFGLYPH_H_ */

Generated on Thu Aug 25 04:11:18 2005 for OpenSG by  doxygen 1.4.3