Logo Search packages:      
Sourcecode: blender version File versions  Download package

FTBufferGlyph.h

#ifndef     __FTBufferGlyph__
#define     __FTBufferGlyph__


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

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


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

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

        /**
         * 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;

        /**
         * The pitch of the glyph 'image'
         */
00058         unsigned int destPitch;
        
        /**
         * Vector from the pen position to the topleft corner of the pixmap
         */
00063         FTPoint pos;
        
        /**
         * Pointer to the 'image' data
         */
00068         unsigned char* data;
        
        
        unsigned char* buffer;
        
};


#endif  //  __FTBufferGlyph__

Generated by  Doxygen 1.6.0   Back to index