FTExtrdGlyph.h

Go to the documentation of this file.
00001 #ifndef     __FTExtrdGlyph__
00002 #define     __FTExtrdGlyph__
00003 
00004 #include <ft2build.h>
00005 #include FT_FREETYPE_H
00006 #include FT_GLYPH_H
00007 
00008 #include "FTGL.h"
00009 #include "FTGlyph.h"
00010 
00011 class FTVectoriser;
00012 
00013 /**
00014  * FTExtrdGlyph is a specialisation of FTGlyph for creating tessellated
00015  * extruded polygon glyphs.
00016  * 
00017  * @see FTGlyphContainer
00018  * @see FTVectoriser
00019  *
00020  */
00021 class FTGL_EXPORT FTExtrdGlyph : public FTGlyph
00022 {
00023     public:
00024         /**
00025          * Constructor. Sets the Error to Invalid_Outline if the glyph isn't an outline.
00026          *
00027          * @param glyph The Freetype glyph to be processed
00028          * @param depth The distance along the z axis to extrude the glyph
00029          * @param useDisplayList Enable or disable the use of Display Lists for this glyph
00030          *                       <code>true</code> turns ON display lists.
00031          *                       <code>false</code> turns OFF display lists.
00032          */
00033         FTExtrdGlyph( FT_GlyphSlot glyph, float depth, bool useDisplayList);
00034 
00035         /**
00036          * Destructor
00037          */
00038         virtual ~FTExtrdGlyph();
00039 
00040         /**
00041          * Renders this glyph at the current pen position.
00042          *
00043          * @param pen   The current pen position.
00044          * @return      The advance distance for this glyph.
00045          */
00046         virtual const FTPoint& Render( const FTPoint& pen);
00047         
00048     private:
00049         /**
00050          * Calculate the normal vector to 2 points. This is 2D and ignores
00051          * the z component. The normal will be normalised
00052          *
00053          * @param a
00054          * @param b
00055          * @return
00056          */
00057         FTPoint GetNormal( const FTPoint &a, const FTPoint &b);
00058         
00059         
00060         /**
00061          * OpenGL display list
00062          */
00063         GLuint glList;
00064     
00065 };
00066 
00067 
00068 #endif  //  __FTExtrdGlyph__
00069 

Generated on Tue Jul 5 14:16:15 2011 for ROOT_528-00b_version by  doxygen 1.5.1