~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to extern/bFTGL/include/FTBitmapGlyph.h

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef     __FTBitmapGlyph__
 
2
#define     __FTBitmapGlyph__
 
3
 
 
4
 
 
5
#include <ft2build.h>
 
6
#include FT_FREETYPE_H
 
7
#include FT_GLYPH_H
 
8
 
 
9
#include "FTGL.h"
 
10
#include "FTGlyph.h"
 
11
 
 
12
 
 
13
/**
 
14
 * FTBitmapGlyph is a specialisation of FTGlyph for creating bitmaps.
 
15
 *
 
16
 * It provides the interface between Freetype glyphs and their openGL
 
17
 * Renderable counterparts. This is an abstract class and derived classes
 
18
 * must implement the <code>Render</code> function. 
 
19
 * 
 
20
 * @see FTGlyphContainer
 
21
 *
 
22
 */
 
23
class FTGL_EXPORT FTBitmapGlyph : public FTGlyph
 
24
{
 
25
    public:
 
26
        /**
 
27
         * Constructor
 
28
         *
 
29
         * @param glyph The Freetype glyph to be processed
 
30
         */
 
31
        FTBitmapGlyph( FT_GlyphSlot glyph);
 
32
 
 
33
        /**
 
34
         * Destructor
 
35
         */
 
36
        virtual ~FTBitmapGlyph();
 
37
 
 
38
        /**
 
39
         * Renders this glyph at the current pen position.
 
40
         *
 
41
         * @param pen   The current pen position.
 
42
         * @return      The advance distance for this glyph.
 
43
         */
 
44
        virtual float Render( const FTPoint& pen);
 
45
        
 
46
    private:
 
47
        /**
 
48
         * The width of the glyph 'image'
 
49
         */
 
50
        unsigned int destWidth;
 
51
 
 
52
        /**
 
53
         * The height of the glyph 'image'
 
54
         */
 
55
        unsigned int destHeight;
 
56
 
 
57
        /**
 
58
         * The pitch of the glyph 'image'
 
59
         */
 
60
        unsigned int destPitch;
 
61
 
 
62
        /**
 
63
         * Vector from the pen position to the topleft corner of the bitmap
 
64
         */
 
65
        FTPoint pos;
 
66
        
 
67
        /**
 
68
         * Pointer to the 'image' data
 
69
         */
 
70
        unsigned char* data;
 
71
        
 
72
};
 
73
 
 
74
 
 
75
#endif  //  __FTBitmapGlyph__
 
76