00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef __ftgl__
00029 # warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
00030 # include <FTGL/ftgl.h>
00031 #endif
00032
00033 #ifndef __FTGlyph__
00034 #define __FTGlyph__
00035
00036 #ifdef __cplusplus
00037
00038 class FTGlyphImpl;
00039
00050 class FTGL_EXPORT FTGlyph
00051 {
00052 protected:
00058 FTGlyph(FT_GlyphSlot glyph);
00059
00060 private:
00067 FTGlyph(FTGlyphImpl *pImpl);
00068
00069
00070 friend class FTBitmapGlyph;
00071 friend class FTBufferGlyph;
00072 friend class FTExtrudeGlyph;
00073 friend class FTOutlineGlyph;
00074 friend class FTPixmapGlyph;
00075 friend class FTPolygonGlyph;
00076 friend class FTTextureGlyph;
00077
00078 public:
00082 virtual ~FTGlyph();
00083
00091 virtual const FTPoint& Render(const FTPoint& pen, int renderMode) = 0;
00092
00098 virtual float Advance() const;
00099
00105 virtual const FTBBox& BBox() const;
00106
00112 virtual FT_Error Error() const;
00113
00114 private:
00118 FTGlyphImpl *impl;
00119 };
00120
00121 #endif //__cplusplus
00122
00123 FTGL_BEGIN_C_DECLS
00124
00132 struct _FTGLGlyph;
00133 typedef struct _FTGLglyph FTGLglyph;
00134
00145 FTGL_EXPORT FTGLglyph *ftglCreateCustomGlyph(FTGLglyph *base, void *data,
00146 void (*renderCallback) (FTGLglyph *, void *, FTGL_DOUBLE, FTGL_DOUBLE,
00147 int, FTGL_DOUBLE *, FTGL_DOUBLE *),
00148 void (*destroyCallback) (FTGLglyph *, void *));
00149
00155 FTGL_EXPORT void ftglDestroyGlyph(FTGLglyph *glyph);
00156
00170 FTGL_EXPORT void ftglRenderGlyph(FTGLglyph *glyph, FTGL_DOUBLE penx,
00171 FTGL_DOUBLE peny, int renderMode,
00172 FTGL_DOUBLE *advancex, FTGL_DOUBLE *advancey);
00179 FTGL_EXPORT float ftglGetGlyphAdvance(FTGLglyph *glyph);
00180
00188 FTGL_EXPORT void ftglGetGlyphBBox(FTGLglyph *glyph, float bounds[6]);
00189
00196 FTGL_EXPORT FT_Error ftglGetGlyphError(FTGLglyph* glyph);
00197
00198 FTGL_END_C_DECLS
00199
00200 #endif // __FTGlyph__
00201