FTPixmapGlyph.h

Go to the documentation of this file.
00001 #ifndef     __FTPixmapGlyph__
00002 #define     __FTPixmapGlyph__
00003 
00004 
00005 #include <ft2build.h>
00006 #include FT_FREETYPE_H
00007 #include FT_GLYPH_H
00008 
00009 #include "FTGL.h"
00010 #include "FTGlyph.h"
00011 
00012 
00013 /**
00014  * FTPixmapGlyph is a specialisation of FTGlyph for creating pixmaps.
00015  * 
00016  * @see FTGlyphContainer
00017  *
00018  */
00019 class  FTGL_EXPORT FTPixmapGlyph : public FTGlyph
00020 {
00021     public:
00022         /**
00023          * Constructor
00024          *
00025          * @param glyph The Freetype glyph to be processed
00026          */
00027         FTPixmapGlyph( FT_GlyphSlot glyph);
00028 
00029         /**
00030          * Destructor
00031          */
00032         virtual ~FTPixmapGlyph();
00033 
00034         /**
00035          * Renders this glyph at the current pen position.
00036          *
00037          * @param pen   The current pen position.
00038          * @return      The advance distance for this glyph.
00039          */
00040         virtual const FTPoint& Render( const FTPoint& pen);
00041         
00042         // attributes
00043 
00044     private:
00045         /**
00046          * The width of the glyph 'image'
00047          */
00048         int destWidth;
00049 
00050         /**
00051          * The height of the glyph 'image'
00052          */
00053         int destHeight;
00054         
00055         /**
00056          * Vector from the pen position to the topleft corner of the pixmap
00057          */
00058         FTPoint pos;
00059         
00060         /**
00061          * Pointer to the 'image' data
00062          */
00063         unsigned char* data;
00064         
00065 };
00066 
00067 
00068 #endif  //  __FTPixmapGlyph__

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