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 _OSGTEXTPIXMAPGLYPH_H_ 00040 #define _OSGTEXTPIXMAPGLYPH_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 TextPixmapGlyph: public TextGlyph 00062 { 00063 00065 friend class TextPixmapFace; 00066 00067 /*========================== PUBLIC =================================*/ 00068 public: 00069 00071 virtual ~TextPixmapGlyph(); 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 getPixmapWidth() const; 00122 00128 inline UInt32 getPixmapPitch() const; 00129 00134 inline UInt32 getPixmapHeight() const; 00135 00142 //inline Int32 getPixmapHoriBearingX() const; 00143 00150 //inline Int32 getPixmapHoriBearingY() const; 00151 00158 //inline Int32 getPixmapVertBearingX() const; 00159 00166 //inline Int32 getPixmapVertBearingY() const; 00167 00172 inline const UInt8 *getPixmap() const; 00173 00182 void putPixmap(Int32 x, Int32 y, UInt8 *tex, UInt32 width, 00183 UInt32 height) const; 00184 00185 /*========================= PROTECTED ===============================*/ 00186 protected: 00187 00189 inline TextPixmapGlyph(); 00190 00192 void flipPixmap(); 00193 00195 UInt32 _width; 00196 00198 UInt32 _pitch; 00199 00201 UInt32 _height; 00202 00204 Int32 _horiBearingX; 00205 00207 Int32 _horiBearingY; 00208 00210 Int32 _vertBearingX; 00211 00213 Int32 _vertBearingY; 00214 00216 UInt8 *_pixmap; 00217 00218 /*========================== PRIVATE ================================*/ 00219 private: 00220 00222 TextPixmapGlyph(const TextPixmapGlyph &); 00223 00225 const TextPixmapGlyph &operator=(const TextPixmapGlyph &); 00226 }; 00227 00228 00229 OSG_END_NAMESPACE 00230 00231 00232 #include <OSGTextPixmapGlyph.inl> 00233 00234 #define OSGTEXTPIXMAPGLYPH_HEADER_CVSID "@(#)$Id: OSGTextPixmapGlyph.h,v 1.1 2005/03/03 13:43:07 a-m-z Exp $" 00235 00236 #endif /* _OSGTEXTPIXMAPGLYPH_H_ */
1.4.3