Logo Search packages:      
Sourcecode: blender version File versions

FTPixmapGlyph.h

#ifndef     __FTPixmapGlyph__
#define     __FTPixmapGlyph__


#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H

#include "FTGL.h"
#include "FTGlyph.h"


/**
 * FTPixmapGlyph is a specialisation of FTGlyph for creating pixmaps.
 * 
 * @see FTGlyphContainer
 *
 */
00019 class  FTGL_EXPORT FTPixmapGlyph : public FTGlyph
{
    public:
        /**
         * Constructor
         *
         * @param glyph The Freetype glyph to be processed
         */
        FTPixmapGlyph( FT_GlyphSlot glyph);

        /**
         * Destructor
         */
        virtual ~FTPixmapGlyph();

        /**
         * Renders this glyph at the current pen position.
         *
         * @param pen   The current pen position.
         * @return      The advance distance for this glyph.
         */
        virtual float Render( const FTPoint& pen);
        
        // attributes

    private:
        /**
         * The width of the glyph 'image'
         */
00048         int destWidth;

        /**
         * The height of the glyph 'image'
         */
00053         int destHeight;
        
        /**
         * Vector from the pen position to the topleft corner of the pixmap
         */
00058         FTPoint pos;
        
        /**
         * Pointer to the 'image' data
         */
00063         unsigned char* data;
        
};


#endif  //  __FTPixmapGlyph__

Generated by  Doxygen 1.6.0   Back to index